Home
Phabricator
Search
Log In
Paste
P58
Masterwork From Distant Lands
Active
Public
Actions
Authored by
dkazakov
on Nov 7 2016, 9:39 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/libs/ui/KisDocument.cpp b/libs/ui/KisDocument.cpp
index a7bd1cd..7a75d9e 100644
--- a/libs/ui/KisDocument.cpp
+++ b/libs/ui/KisDocument.cpp
@@ -939,8 +939,21 @@ bool KisDocument::isModified() const
bool KisDocument::saveNativeFormat(const QString & file)
{
+ KisImageSP clonedImage;
+
Private::SafeSavingLocker locker(d);
- if (!locker.successfullyLocked()) return false;
+ if (locker.successfullyLocked()) {
+ clonedImage = d->image->clone(true);
+ } else {
+ QMessageBox::message("Emergency save!");
+
+ d->image->lock();
+ clonedImage = d->image->clone(true);
+ }
+
+ d->image->unlock();
+
+ // From now on we work only with clonedImage, not with d->image!
d->lastErrorMessage.clear();
//dbgUI <<"Saving to store";
diff --git a/libs/ui/KisMainWindow.cpp b/libs/ui/KisMainWindow.cpp
index 977d0d4..fb4364e 100644
--- a/libs/ui/KisMainWindow.cpp
+++ b/libs/ui/KisMainWindow.cpp
@@ -885,7 +885,8 @@ bool KisMainWindow::saveDocument(KisDocument *document, bool saveas, bool silent
KisDelayedSaveDialog dlg(document->image(), this);
dlg.blockIfImageIsBusy();
- if (dlg.result() != QDialog::Accepted) {
+ if (dlg.result() != QDialog::Accepted &&
+ dlg.result() != SaveAnyway) {
return false;
}
dkazakov
edited the content of this paste.
(Show Details)
Nov 7 2016, 9:39 AM
dkazakov
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
dkazakov
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment