mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 12:30:18 +02:00
Recover last session from main() instead of constructor
This fixes a bug where the apps using the file selector wouldn't be launched at all when selecting a new file after a session recover.
This commit is contained in:
parent
e86a96c73f
commit
0e4180460b
@ -259,11 +259,6 @@ GMenu2X::GMenu2X()
|
||||
#ifdef ENABLE_CPUFREQ
|
||||
setClock(confInt["menuClock"]);
|
||||
#endif
|
||||
//recover last session
|
||||
readTmp();
|
||||
if (lastSelectorElement>-1 && menu->selLinkApp()!=NULL && (!menu->selLinkApp()->getSelectorDir().empty() || !lastSelectorDir.empty()))
|
||||
menu->selLinkApp()->selector(lastSelectorElement,lastSelectorDir);
|
||||
|
||||
}
|
||||
|
||||
GMenu2X::~GMenu2X() {
|
||||
@ -592,6 +587,13 @@ void GMenu2X::main() {
|
||||
|
||||
appToLaunch = nullptr;
|
||||
|
||||
// Recover last session
|
||||
readTmp();
|
||||
if (lastSelectorElement > -1 && menu->selLinkApp() &&
|
||||
(!menu->selLinkApp()->getSelectorDir().empty()
|
||||
|| !lastSelectorDir.empty()))
|
||||
menu->selLinkApp()->selector(lastSelectorElement, lastSelectorDir);
|
||||
|
||||
while (true) {
|
||||
// Remove dismissed layers from the stack.
|
||||
for (auto it = layers.begin(); it != layers.end(); ) {
|
||||
|
Loading…
Reference in New Issue
Block a user