Issue #727 - skip import steps if current piskel is empty

This commit is contained in:
Julian Descottes
2017-10-01 13:58:48 +02:00
parent 95c8df1224
commit bf4cc3302a
3 changed files with 16 additions and 3 deletions

View File

@@ -80,7 +80,13 @@
var step = this.wizard.getCurrentStep();
if (step.name === 'IMAGE_IMPORT') {
this.wizard.goTo('SELECT_MODE');
if (this.piskelController.isEmpty()) {
// If the current sprite is empty finalize immediately and replace the current sprite.
this.mergeData.importMode = ns.steps.SelectMode.MODES.REPLACE;
this.finalizeImport_();
} else {
this.wizard.goTo('SELECT_MODE');
}
} else if (step.name === 'SELECT_MODE') {
if (this.mergeData.importMode === ns.steps.SelectMode.MODES.REPLACE) {
this.finalizeImport_();