From ffe6c157279e115f4658d8c66622085f05cfbf43 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 31 May 2012 15:27:03 -0700 Subject: fixing the switching between various types of documents Signed-off-by: Valerio Virgillito --- js/controllers/selection-controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/controllers/selection-controller.js') diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index a219c597..28c0f3d3 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js @@ -33,17 +33,19 @@ exports.SelectionController = Montage.create(Component, { return; } - if(this._currentDocument) { + if(this._currentDocument && this._currentDocument.currentView === "design") { this._currentDocument.model.selection = this.application.ninja.selectedElements; this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; } this._currentDocument = value; + /* if(!value) { } else if(this._currentDocument.currentView === "design") { } else { } + */ } }, @@ -57,6 +59,8 @@ exports.SelectionController = Montage.create(Component, { return this._selectedElements; }, set: function(value) { + if(this.currentDocument && this.currentDocument.currentView === "code") return; + if(value) { this._selectedElements = value; -- cgit v1.2.3