Cleaning a bit pixel utils + fix empty paste bug

This commit is contained in:
Vince
2012-09-15 01:01:47 +02:00
parent 697f270d78
commit 28835f96f3
3 changed files with 36 additions and 70 deletions

View File

@@ -72,7 +72,7 @@
};
ns.SelectionManager.prototype.onPaste_ = function(evt) {
if(this.currentSelection) {
if(this.currentSelection && this.currentSelection.hasPastedContent) {
var pixels = this.currentSelection.pixels;
var currentFrame = this.framesheet.getCurrentFrame();
for(var i=0, l=pixels.length; i<l; i++) {
@@ -86,9 +86,6 @@
}
}
}
else {
throw "Bad state for PASTE callback in SelectionManager";
}
};
/**