Save screen settings when leaving screen (only)

This commit is contained in:
Raphael Coeffic
2021-04-18 09:41:15 +02:00
parent 0e684058e4
commit b259d0baeb
2 changed files with 2 additions and 7 deletions
+2
View File
@@ -22,6 +22,7 @@
#include "menu_screen.h"
#include "screen_setup.h"
#include "view_main.h"
#include "storage/storage.h"
ScreenMenu::ScreenMenu():
TabsGroup(ICON_THEME)
@@ -30,6 +31,7 @@ ScreenMenu::ScreenMenu():
setCloseHandler([]{
ViewMain::instance()->updateTopbarVisibility();
storageDirty(EE_MODEL);
});
}
-7
View File
@@ -222,7 +222,6 @@ class SetupWidgetsPage: public FormWindow
if (event == EVT_KEY_LONG(KEY_EXIT) || event == EVT_KEY_BREAK(KEY_EXIT)) {
killEvents(event);
deleteLater();
SET_DIRTY();
}
}
#endif
@@ -327,8 +326,6 @@ void ScreenAddPage::build(FormWindow * window)
if (menu->getTabs() < MAX_CUSTOM_SCREENS) {
menu->addTab(new ScreenAddPage(menu, menu->getTabs()));
}
storageDirty(EE_MODEL);
}
else {
TRACE("Add main view: factory is NULL");
@@ -417,7 +414,6 @@ void ScreenSetupPage::build(FormWindow * window)
optionsWindow->clear();
createCustomScreen(factory, idx);
updateLayoutOptions(optionsWindow, idx);
SET_DIRTY();
};
auto layoutChoice = new LayoutChoice(window, layoutSlot, getFactory, setLayout);
@@ -470,9 +466,6 @@ void ScreenSetupPage::build(FormWindow * window)
pageIdx = menu->getTabs() - 2;
}
menu->setCurrentTab(pageIdx);
// save the changes
storageDirty(EE_MODEL);
return 0;
});