Skip to content

Commit

Permalink
Fix sleep settings not resetting properly
Browse files Browse the repository at this point in the history
Clicking the reset button in SettingsPopup calls loadSettings, but
loadSettings calls setAutoStartApplication via setProperty, and
setAutoStartApplication calls saveSettings. This prevents the sleep
settings from resetting properly. I moved the saveSettings call to the
QML to fix this.
  • Loading branch information
Nick committed Sep 28, 2021
1 parent 5d9ed8f commit 985414e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion applications/launcher/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ QList<QObject*> Controller::getApps(){
void Controller::setAutoStartApplication(QString autoStartApplication){
m_autoStartApplication = autoStartApplication;
emit autoStartApplicationChanged(autoStartApplication);
saveSettings();
}
AppItem* Controller::getApplication(QString name){
for(auto app : applications){
Expand Down
2 changes: 1 addition & 1 deletion applications/launcher/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ ApplicationWindow {
}
var name = itemInfo.model.name
controller.autoStartApplication = controller.autoStartApplication !== name ? name : "";

controller.saveSettings();
}
}
}
Expand Down

0 comments on commit 985414e

Please sign in to comment.