mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 10:20:50 +00:00
Don't copy the export file name to sprite preferences created from Save As or Export (fix #1964)
This commit is contained in:
parent
42d5f10437
commit
22b58aafaa
@ -1,4 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2019 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -134,6 +135,11 @@ std::string SaveFileBaseCommand::saveAsDialog(
|
||||
const std::string& forbiddenFilename)
|
||||
{
|
||||
Doc* document = context->activeDocument();
|
||||
|
||||
// Before to release de original document, we have to save all
|
||||
// preferences which are not saved in a Close operation:
|
||||
Preferences::instance().save();
|
||||
|
||||
std::string filename;
|
||||
|
||||
if (!m_filename.empty()) {
|
||||
@ -167,6 +173,14 @@ std::string SaveFileBaseCommand::saveAsDialog(
|
||||
saveDocumentInBackground(
|
||||
context, document,
|
||||
filename, markAsSaved);
|
||||
auto& docPref = Preferences::instance().document(document);
|
||||
docPref.saveCopy.filename(docPref.saveCopy.filename.defaultValue());
|
||||
docPref.saveCopy.aniDir(docPref.saveCopy.aniDir.defaultValue());
|
||||
docPref.saveCopy.applyPixelRatio(docPref.saveCopy.applyPixelRatio.defaultValue());
|
||||
docPref.saveCopy.frameTag(docPref.saveCopy.frameTag.defaultValue());
|
||||
docPref.saveCopy.layer(docPref.saveCopy.layer.defaultValue());
|
||||
docPref.saveCopy.forTwitter(docPref.saveCopy.forTwitter.defaultValue());
|
||||
docPref.saveCopy.resizeScale(docPref.saveCopy.resizeScale.defaultValue());
|
||||
}
|
||||
|
||||
return filename;
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2019 Igara Studio S.A.
|
||||
// Copyright (C) 2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -60,7 +61,6 @@ ExportFileWindow::ExportFileWindow(const Doc* doc)
|
||||
forTwitter()->setSelected(m_docPref.saveCopy.forTwitter());
|
||||
adjustResize()->setVisible(false);
|
||||
|
||||
updateAniDir();
|
||||
updateAdjustResizeButton();
|
||||
|
||||
outputFilename()->Change.connect(
|
||||
@ -96,6 +96,7 @@ void ExportFileWindow::savePref()
|
||||
m_docPref.saveCopy.filename(outputFilenameValue());
|
||||
m_docPref.saveCopy.resizeScale(resizeValue());
|
||||
m_docPref.saveCopy.layer(layersValue());
|
||||
m_docPref.saveCopy.aniDir(aniDirValue());
|
||||
m_docPref.saveCopy.frameTag(framesValue());
|
||||
m_docPref.saveCopy.applyPixelRatio(applyPixelRatio());
|
||||
m_docPref.saveCopy.forTwitter(isForTwitter());
|
||||
|
Loading…
x
Reference in New Issue
Block a user