Issue #315 : avoid saving state when replaying state

This commit is contained in:
jdescottes
2015-10-02 01:48:35 +02:00
parent a8f727fdcd
commit c9529dc65c
7 changed files with 149 additions and 13 deletions

View File

@ -8,7 +8,15 @@
ns.AbstractTransformTool.prototype.apply = function (evt) {
var allFrames = evt.shiftKey;
var allLayers = evt.ctrlKey;
this.applyTool_(evt.altKey, allFrames, allLayers);
$.publish(Events.PISKEL_RESET);
this.raiseSaveStateEvent_({
altKey : evt.altKey,
allFrames : allFrames,
allLayers : allLayers
});
};
ns.AbstractTransformTool.prototype.applyTool_ = function (altKey, allFrames, allLayers) {
@ -20,13 +28,6 @@
this.applyToolOnFrame_(frame, altKey);
}.bind(this));
}.bind(this));
$.publish(Events.PISKEL_RESET);
this.raiseSaveStateEvent_({
altKey : altKey,
allFrames : allFrames,
allLayers : allLayers
});
};
ns.AbstractTransformTool.prototype.raiseSaveStateEvent_ = function (replayData) {

View File

@ -17,7 +17,5 @@
frame.setPixels(ref.getPixels());
}
});
$.publish(Events.PISKEL_RESET);
this.raiseSaveStateEvent_({});
};
})();