mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Restore filename if "save as" fails
This commit is contained in:
parent
6861bd7bb7
commit
fa760d8a21
@ -185,6 +185,7 @@ protected:
|
||||
{
|
||||
ContextWriter writer(reader);
|
||||
Document* documentWriter = writer.document();
|
||||
std::string oldFilename = documentWriter->getFilename();
|
||||
|
||||
// Change the document file name
|
||||
documentWriter->setFilename(filename.c_str());
|
||||
@ -193,6 +194,9 @@ protected:
|
||||
// Save the document
|
||||
save_document_in_background(documentWriter, markAsSaved);
|
||||
|
||||
if (documentWriter->isModified())
|
||||
documentWriter->setFilename(oldFilename);
|
||||
|
||||
update_screen_for_document(documentWriter);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user