aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index f85e2f97..72a669b3 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -45,6 +45,11 @@ exports.DocumentController = Montage.create(Component, {
45 45
46 if(this._currentDocument) { 46 if(this._currentDocument) {
47 this._currentDocument.model.currentView.hide(); 47 this._currentDocument.model.currentView.hide();
48
49 if(this._currentDocument.model.parentContainer !== value.model.parentContainer) {
50 this._currentDocument.model.parentContainer.style["display"] = "none";
51 value.model.parentContainer.style["display"] = "block";
52 }
48 } 53 }
49 54
50 this._currentDocument = value; 55 this._currentDocument = value;
@@ -355,10 +360,7 @@ exports.DocumentController = Montage.create(Component, {
355 currentDocument.serializeDocument(); 360 currentDocument.serializeDocument();
356 } 361 }
357 362
358 if(currentDocument.model.parentContainer !== newDocument.model.parentContainer) { 363
359 currentDocument.model.parentContainer.style["display"] = "none";
360 newDocument.model.parentContainer.style["display"] = "block";
361 }
362 364
363 if(currentDocument.currentView === "code" && newDocument.currentView === "design") { 365 if(currentDocument.currentView === "code" && newDocument.currentView === "design") {
364 this.application.ninja.stage.showCodeViewBar(false); 366 this.application.ninja.stage.showCodeViewBar(false);