mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 22:28:25 +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
|
#ifdef ENABLE_CPUFREQ
|
||||||
setClock(confInt["menuClock"]);
|
setClock(confInt["menuClock"]);
|
||||||
#endif
|
#endif
|
||||||
//recover last session
|
|
||||||
readTmp();
|
|
||||||
if (lastSelectorElement>-1 && menu->selLinkApp()!=NULL && (!menu->selLinkApp()->getSelectorDir().empty() || !lastSelectorDir.empty()))
|
|
||||||
menu->selLinkApp()->selector(lastSelectorElement,lastSelectorDir);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GMenu2X::~GMenu2X() {
|
GMenu2X::~GMenu2X() {
|
||||||
@ -592,6 +587,13 @@ void GMenu2X::main() {
|
|||||||
|
|
||||||
appToLaunch = nullptr;
|
appToLaunch = nullptr;
|
||||||
|
|
||||||
|
// Recover last session
|
||||||
|
readTmp();
|
||||||
|
if (lastSelectorElement > -1 && menu->selLinkApp() &&
|
||||||
|
(!menu->selLinkApp()->getSelectorDir().empty()
|
||||||
|
|| !lastSelectorDir.empty()))
|
||||||
|
menu->selLinkApp()->selector(lastSelectorElement, lastSelectorDir);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// Remove dismissed layers from the stack.
|
// Remove dismissed layers from the stack.
|
||||||
for (auto it = layers.begin(); it != layers.end(); ) {
|
for (auto it = layers.begin(); it != layers.end(); ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user