From 941219363bcd3371f96d4aa78de8ca78a192e103 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 19 Mar 2020 09:50:18 -0300 Subject: [PATCH] Keep "Export File" window position saved on preferences (fix #2300) --- src/app/commands/cmd_save_file.cpp | 8 ++++++-- src/app/ui/export_file_window.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/commands/cmd_save_file.cpp b/src/app/commands/cmd_save_file.cpp index 525fd215b..596589452 100644 --- a/src/app/commands/cmd_save_file.cpp +++ b/src/app/commands/cmd_save_file.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2019 Igara Studio S.A. +// Copyright (C) 2019-2020 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -363,8 +363,12 @@ void SaveFileCopyAsCommand::onExecute(Context* context) return result; }); + win.remapWindow(); + load_window_pos(&win, "ExportFile"); again:; - if (!win.show()) + const bool result = win.show(); + save_window_pos(&win, "ExportFile"); + if (!result) return; outputFilename = win.outputFilenameValue(); diff --git a/src/app/ui/export_file_window.h b/src/app/ui/export_file_window.h index 886fcbeb0..9aa1338a2 100644 --- a/src/app/ui/export_file_window.h +++ b/src/app/ui/export_file_window.h @@ -1,4 +1,5 @@ // Aseprite +// Copyright (C) 2020 Igara Studio S.A. // Copyright (C) 2018 David Capello // // This program is distributed under the terms of @@ -18,7 +19,7 @@ namespace app { class Doc; - class ExportFileWindow : protected app::gen::ExportFile { + class ExportFileWindow : public app::gen::ExportFile { public: ExportFileWindow(const Doc* doc);