fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: removing unused code
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
9c233bd
..
2fd4e41
100644
(file)
--- a/
src/smartxml/smartxml.js
+++ b/
src/smartxml/smartxml.js
@@
-419,10
+419,10
@@
$.extend(Document.prototype, Backbone.Events, {
if(this._transformationLevel === 1 && !this._undoInProgress) {
this.undoStack.push(transformation);
}
if(this._transformationLevel === 1 && !this._undoInProgress) {
this.undoStack.push(transformation);
}
- this._transformationLevel--;
- if(!this._undoInProgress) {
+ if(!this._undoInProgress && this._transformationLevel === 1) {
this.redoStack = [];
}
this.redoStack = [];
}
+ this._transformationLevel--;
return toret;
} else {
throw new Error('Transformation ' + transformation + ' doesn\'t exist!');
return toret;
} else {
throw new Error('Transformation ' + transformation + ' doesn\'t exist!');