Clear the workspace undo when the workspace updates.

This commit is contained in:
Karishma Chadha committed 2018-07-24 15:01:03 -04:00
1 parent 3b86377e40
commit a5abdfeae5
1 file changed
+5
+5
View File
@@ -310,6 +310,11 @@ class Blocks extends React.Component {
this.workspace.scale = scale;
this.workspace.resize();
}
// Clear the undo state of the workspace since this is a
// fresh workspace and we don't want any changes made to another sprites
// workspace to be 'undone' here.
this.workspace.clearUndo();
}
handleExtensionAdded (blocksInfo) {
// select JSON from each block info object then reject the pseudo-blocks which don't have JSON, like separators