Add recent file and folder after exporting sprite sheet (fix #2202)

This commit is contained in:
David Capello 2019-11-29 10:12:21 -03:00
parent a85368c6c2
commit aec82eccb2

View File

@ -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()));