Merge pull request #29 from captainbrosset/del-first-frame-bug

fixed bug where deleting first frame was failing
This commit is contained in:
Julian Descottes 2012-09-04 23:19:09 -07:00
commit 547d4affd1

View File

@ -183,7 +183,8 @@ $.namespace("pskl");
removeFrame: function(frameIndex) {
frameSheet.removeFrameByIndex(frameIndex);
this.setActiveFrameAndRedraw(frameIndex - 1);
var activeFrameIndex = frameIndex ? frameIndex - 1 : 0;
this.setActiveFrameAndRedraw(activeFrameIndex);
},
duplicateFrame: function(frameIndex) {