Commit 23fc824b authored by Sergey Luzyanin's avatar Sergey Luzyanin

remove redundant shape after Undo

parent d12953ba
......@@ -1012,12 +1012,6 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
}
}
for(var sId in mapSlides){
if(mapSlides.hasOwnProperty(sId)){
mapSlides[sId].correctContent();
}
}
if(bChangedLayout){
for(var i = oLogicDocument.Slides.length - 1; i > -1 ; --i){
var Layout = oLogicDocument.Slides[i].Layout;
......
......@@ -700,6 +700,8 @@ Slide.prototype =
},
correctContent: function(){
for(var i = this.cSld.spTree.length - 1; i > -1 ; --i){
if(this.cSld.spTree[i].CheckCorrect && !this.cSld.spTree[i].CheckCorrect() || this.cSld.spTree[i].bDeleted){
if(this.cSld.spTree[i].setBDeleted){
......@@ -707,13 +709,12 @@ Slide.prototype =
}
this.removeFromSpTreeById(this.cSld.spTree[i].Get_Id());
}
else{
for(var j = i - 1; j > -1; --j){
if(this.cSld.spTree[i] === this.cSld.spTree[j]){
this.cSld.spTree[i].setBDeleted(true);
this.removeFromSpTreeByPos(i);
break;
}
}
for(var i = this.cSld.spTree.length - 1; i > -1 ; --i){
for(var j = i - 1; j > -1; --j){
if(this.cSld.spTree[i] === this.cSld.spTree[j]){
this.removeFromSpTreeByPos(i);
break;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment