From 4e21db069b28c79236c8c7fd19dcc7810d28c5cb Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 29 Feb 2012 12:18:09 -0800 Subject: set selectionContainer before restoring selected elements Signed-off-by: Ananya Sen --- js/document/html-document.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/document') diff --git a/js/document/html-document.js b/js/document/html-document.js index 9e3f0cdd..9dcea8cb 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -726,6 +726,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { this.application.ninja.stage._scrollLeft = this.savedTopScroll; } + this.application.ninja.currentSelectedContainer = this.documentRoot; if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){ this.application.ninja.selectedElements = this.selectionModel.slice(0); } @@ -735,7 +736,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { this.application.ninja.undocontroller.undoQueue = this.undoStack.slice(0); this.application.ninja.undocontroller.redoQueue = this.redoStack.slice(0); - this.application.ninja.currentSelectedContainer = this.documentRoot; + } } //////////////////////////////////////////////////////////////////// -- cgit v1.2.3