select the first imported layer after a merge

This commit is contained in:
juliandescottes 2017-05-08 23:44:14 +02:00 committed by Julian Descottes
parent 41ef0cd460
commit 4d07a4eb90

View file

@ -158,6 +158,12 @@
resize: this.mergeData.resize
});
this.piskelController.setPiskel(merge);
// Set the first imported layer as selected.
var importedLayers = piskel.getLayers().length;
var currentLayers = this.piskelController.getLayers().length;
this.piskelController.setCurrentLayerIndex(currentLayers - importedLayers);
this.closeDialog();
}
};