From 7e615eaa90c7bd7a4da15ce04eb089aa3367e389 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 1 Aug 2012 23:36:13 -0700 Subject: fixing a few issues when switching between code view documents Signed-off-by: Valerio Virgillito --- js/controllers/selection-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/controllers/selection-controller.js') diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 7a26ed3b..4b031d70 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js @@ -58,13 +58,13 @@ exports.SelectionController = Montage.create(Component, { return; } - if(this._currentDocument && this._currentDocument.currentView === "design") { + if(this._currentDocument && (this._currentDocument.currentView === "design" || this._currentDocument.model.currentView.identifier !== "code")) { this._currentDocument.model._selection = this.application.ninja.selectedElements; } this._currentDocument = value; - if(this._currentDocument && this._currentDocument.currentView === "design") { + if(this._currentDocument && (this._currentDocument.currentView === "design" || this._currentDocument.model.currentView.identifier !== "code")) { this.selectedElements = this._currentDocument.model.selection; } /* -- cgit v1.2.3