mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: ignore save requests after closing all windows
This commit is contained in:
parent
1554d7b6a4
commit
f08d1826bb
|
@ -422,7 +422,14 @@ void WindowManager::save()
|
|||
{
|
||||
return;
|
||||
}
|
||||
qCDebug(chatterinoWindowmanager) << "[WindowManager] Saving";
|
||||
|
||||
if (this->shuttingDown_)
|
||||
{
|
||||
qCDebug(chatterinoWindowmanager) << "Skipping save (shutting down)";
|
||||
return;
|
||||
}
|
||||
|
||||
qCDebug(chatterinoWindowmanager) << "Saving";
|
||||
assertInGuiThread();
|
||||
QJsonDocument document;
|
||||
|
||||
|
@ -701,6 +708,9 @@ void WindowManager::closeAll()
|
|||
{
|
||||
assertInGuiThread();
|
||||
|
||||
qCDebug(chatterinoWindowmanager) << "Shutting down (closing windows)";
|
||||
this->shuttingDown_ = true;
|
||||
|
||||
for (Window *window : windows_)
|
||||
{
|
||||
window->close();
|
||||
|
|
|
@ -140,6 +140,7 @@ private:
|
|||
const QString windowLayoutFilePath;
|
||||
|
||||
bool initialized_ = false;
|
||||
bool shuttingDown_ = false;
|
||||
|
||||
QPoint emotePopupPos_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue