mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Made SettingsDialog::exec() return whether a setting was changed
Previously, exec() always returned true and a separate edited() method would indicate whether any settings were changed.
This commit is contained in:
@@ -141,12 +141,6 @@ bool SettingsDialog::exec() {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SettingsDialog::edited() {
|
||||
for (uint i=0; i < settings.size(); i++) {
|
||||
if (settings[i]->edited()) return true;
|
||||
}
|
||||
return false;
|
||||
return any_of(settings.begin(), settings.end(),
|
||||
[](unique_ptr<MenuSetting>& setting){ return setting->edited(); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user