From ad12ec4a0d574408c948b0a180e4de820553dce3 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 25 Oct 2019 14:40:21 -0300 Subject: [PATCH] Export Sprite Sheet: Select old sprite tab when the preview is unchecked --- src/app/commands/cmd_export_sprite_sheet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/commands/cmd_export_sprite_sheet.cpp b/src/app/commands/cmd_export_sprite_sheet.cpp index 04e48534a..55383d7da 100644 --- a/src/app/commands/cmd_export_sprite_sheet.cpp +++ b/src/app/commands/cmd_export_sprite_sheet.cpp @@ -870,9 +870,12 @@ private: if (!preview()->isSelected()) { if (m_spriteSheet) { - DocDestroyer destroyer(UIContext::instance(), m_spriteSheet.release(), 100); + auto ctx = UIContext::instance(); + DocDestroyer destroyer(ctx, m_spriteSheet.release(), 100); destroyer.destroyDocument(); m_editor = nullptr; + + ctx->setActiveDocument(m_site.document()); } return; }