From 03ea76700cb8bee3f4f58acf3e3503b0642d13fb Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 29 Feb 2012 11:46:19 -0800 Subject: fixed selection which click after switching to a document Signed-off-by: Ananya Sen --- js/controllers/selection-controller.js | 4 +++- 1 file changed, 3 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 0f2a16e0..184c4899 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js @@ -92,12 +92,14 @@ exports.SelectionController = Montage.create(Component, { handleSwitchDocument: { value: function() { this._selectedItems = this.application.ninja.selectedElements.slice(0); - if(this._selectedItems.length === 0){ + if(this._selectedItems.length === 0 ){ this._isDocument = true; }else{ this._isDocument = false; } NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); + + this._selectionContainer = this.application.ninja.currentSelectedContainer; } }, -- cgit v1.2.3