diff options
Diffstat (limited to 'js/controllers/selection-controller.js')
-rwxr-xr-x | js/controllers/selection-controller.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 08eb018f..3f9d8514 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -91,15 +91,17 @@ exports.SelectionController = Montage.create(Component, { | |||
91 | 91 | ||
92 | handleSwitchDocument: { | 92 | handleSwitchDocument: { |
93 | value: function() { | 93 | value: function() { |
94 | this._selectedItems = this.application.ninja.selectedElements.slice(0); | 94 | if(this.application.ninja.documentController.activeDocument.currentView === "design"){ |
95 | if(this._selectedItems.length === 0 ){ | 95 | this._selectedItems = this.application.ninja.selectedElements.slice(0); |
96 | this._isDocument = true; | 96 | if(this._selectedItems.length === 0 ){ |
97 | }else{ | 97 | this._isDocument = true; |
98 | this._isDocument = false; | 98 | }else{ |
99 | } | 99 | this._isDocument = false; |
100 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); | 100 | } |
101 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); | ||
101 | 102 | ||
102 | this._selectionContainer = this.application.ninja.currentSelectedContainer; | 103 | this._selectionContainer = this.application.ninja.currentSelectedContainer; |
104 | } | ||
103 | } | 105 | } |
104 | }, | 106 | }, |
105 | 107 | ||