diff --git a/data/pref.xml b/data/pref.xml
index c09c5230c..84562f68d 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -278,6 +278,7 @@
+
diff --git a/src/app/commands/cmd_export_sprite_sheet.cpp b/src/app/commands/cmd_export_sprite_sheet.cpp
index 1dbfcef08..fc19ac39a 100644
--- a/src/app/commands/cmd_export_sprite_sheet.cpp
+++ b/src/app/commands/cmd_export_sprite_sheet.cpp
@@ -757,6 +757,7 @@ void ExportSpriteSheetCommand::onExecute(Context* context)
if (!window.ok())
return;
+ docPref.spriteSheet.defined(true);
docPref.spriteSheet.type(window.spriteSheetTypeValue());
docPref.spriteSheet.columns(window.columnsValue());
docPref.spriteSheet.rows(window.rowsValue());
@@ -778,6 +779,7 @@ void ExportSpriteSheetCommand::onExecute(Context* context)
// Default preferences for future sprites
DocumentPreferences& defPref(Preferences::instance().document(nullptr));
defPref.spriteSheet = docPref.spriteSheet;
+ defPref.spriteSheet.defined(false);
if (!defPref.spriteSheet.textureFilename().empty())
defPref.spriteSheet.textureFilename.setValueAndDefault(kSpecifiedFilename);
if (!defPref.spriteSheet.dataFilename().empty())
diff --git a/src/app/commands/cmd_repeat_last_export.cpp b/src/app/commands/cmd_repeat_last_export.cpp
index ab80da20a..b59d498b9 100644
--- a/src/app/commands/cmd_repeat_last_export.cpp
+++ b/src/app/commands/cmd_repeat_last_export.cpp
@@ -1,5 +1,5 @@
// Aseprite
-// Copyright (C) 2001-2015 David Capello
+// Copyright (C) 2001-2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
@@ -51,8 +51,7 @@ void RepeatLastExportCommand::onExecute(Context* context)
DocumentPreferences& docPref =
Preferences::instance().document(document);
- params.set("ui",
- (docPref.spriteSheet.type() == app::SpriteSheetType::None ? "1": "0"));
+ params.set("ui", (docPref.spriteSheet.defined() ? "0": "1"));
}
context->executeCommand(cmd, params);