From 209ec9524a987a8f8bc20c57e2a76ac55be15fd9 Mon Sep 17 00:00:00 2001
From: Nivesh Rajbhandari
Date: Thu, 24 May 2012 11:11:47 -0700
Subject: Fixed selection bug when switching/opening documents. Also, use saved
 scroll values when switching between documents.

Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
---
 js/controllers/selection-controller.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'js/controllers/selection-controller.js')

diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js
index 1092615a..214b9032 100755
--- a/js/controllers/selection-controller.js
+++ b/js/controllers/selection-controller.js
@@ -67,10 +67,9 @@ exports.SelectionController = Montage.create(Component, {
             this._isDocument = true;
 
             if(currentSelectionArray) {
-                if(currentSelectionArray.length >= 1) {
+                this.application.ninja.selectedElements = currentSelectionArray;
+                if(currentSelectionArray.length) {
                     this._isDocument = false;
-
-                    this.application.ninja.selectedElements = currentSelectionArray;
                     NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument});
                 }
             }
-- 
cgit v1.2.3