Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix: Document save failure when KRA file no longer exists.

Emmet O'Neillbc052bd7bf99
diff --git a/libs/ui/KisMainWindow.cpp b/libs/ui/KisMainWindow.cpp
index e0b2b17132..f30fee2e68 100644
--- a/libs/ui/KisMainWindow.cpp
+++ b/libs/ui/KisMainWindow.cpp
@@ -1329,6 +1329,11 @@ bool KisMainWindow::saveDocument(KisDocument *document, bool saveas, bool isExpo
saveas = true;
}
+ QFile target(document->path());
+ if (!target.exists()) { // Possible when file is moved/unmounted during Krita session.
+ saveas = true;
+ }
+
connect(document, SIGNAL(completed()), this, SLOT(slotSaveCompleted()));
connect(document, SIGNAL(canceled(QString)), this, SLOT(slotSaveCanceled(QString)));