From aec82eccb248c7fcf6e3ca06fc9d17322f8148d1 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 29 Nov 2019 10:12:21 -0300 Subject: [PATCH] Add recent file and folder after exporting sprite sheet (fix #2202) --- src/app/commands/cmd_export_sprite_sheet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/commands/cmd_export_sprite_sheet.cpp b/src/app/commands/cmd_export_sprite_sheet.cpp index 1fbecb726..fafbe2f04 100644 --- a/src/app/commands/cmd_export_sprite_sheet.cpp +++ b/src/app/commands/cmd_export_sprite_sheet.cpp @@ -23,6 +23,7 @@ #include "app/modules/editors.h" #include "app/modules/gui.h" #include "app/pref/preferences.h" +#include "app/recent_files.h" #include "app/restore_visible_layers.h" #include "app/task.h" #include "app/ui/editor/editor.h" @@ -1308,6 +1309,10 @@ void ExportSpriteSheetCommand::onExecute(Context* context) if (statusbar) statusbar->showTip(1000, "Sprite Sheet Generated"); + // Save the exported sprite sheet as a recent file + if (newDocument->isAssociatedToFile()) + App::instance()->recentFiles()->addRecentFile(newDocument->filename()); + // Copy background and grid preferences DocumentPreferences& newDocPref( Preferences::instance().document(newDocument.get()));