fix: handle aboutToQuit() (#6159)

This commit is contained in:
nerix
2025-04-19 13:05:36 +02:00
committed by GitHub
parent 3282cac94d
commit 52067d0af7
4 changed files with 20 additions and 4 deletions
+5
View File
@@ -278,6 +278,11 @@ void Settings::restoreSnapshot()
}
}
void Settings::disableSave()
{
this->disableSaving = true;
}
float Settings::getClampedUiScale() const
{
return std::clamp(this->uiScale.getValue(), 0.2F, 10.F);
+3 -1
View File
@@ -104,7 +104,7 @@ class Settings
static Settings *instance_;
Settings *prevInstance_ = nullptr;
const bool disableSaving;
bool disableSaving;
public:
Settings(const Args &args, const QString &settingsDirectory);
@@ -120,6 +120,8 @@ public:
void saveSnapshot();
void restoreSnapshot();
void disableSave();
FloatSetting uiScale = {"/appearance/uiScale2", 1};
BoolSetting windowTopMost = {"/appearance/windowAlwaysOnTop", false};