Commit b9671ace authored by Anna Medonosová's avatar Anna Medonosová

Disallow closing Krita while it initiates saving

Do not close Krita while KisMainWindow has the savingEntryMutex locked
(while the background saving process is being initiated). After the
background saving job is initiated, KisDocument blocks closing while it
saves itself.

CCBUG: 409395
parent 0db31fb3
......@@ -1271,6 +1271,11 @@ void KisMainWindow::redo()
void KisMainWindow::closeEvent(QCloseEvent *e)
{
if (hackIsSaving()) {
e->setAccepted(false);
return;
}
if (!KisPart::instance()->closingSession()) {
QAction *action= d->viewManager->actionCollection()->action("view_show_canvas_only");
if ((action) && (action->isChecked())) {
......@@ -1676,6 +1681,12 @@ bool KisMainWindow::slotFileCloseAll()
void KisMainWindow::slotFileQuit()
{
// Do not close while KisMainWindow has the savingEntryMutex locked, bug409395.
// After the background saving job is initiated, KisDocument blocks closing
// while it saves itself.
if (hackIsSaving()) {
return;
}
KisPart::instance()->closeSession();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment