fix: handle aboutToQuit() (#6159)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user