From 1766c6b17e2311fcd21c2be6608c7dcdc0a9b23a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 28 Feb 2012 15:07:49 -0800 Subject: persist selections while switching documents Signed-off-by: Ananya Sen --- js/panels/properties/content.reel/content.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/panels/properties') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 8fa33a75..e92fbcb2 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -55,6 +55,8 @@ exports.Content = Montage.create(Component, { } this.eventManager.addEventListener("openDocument", this, false); + + this.eventManager.addEventListener("switchDocument", this, false); } }, @@ -74,6 +76,15 @@ exports.Content = Montage.create(Component, { } }, + handleSwitchDocument: { + value: function(){ + // For now always assume that the stage is selected by default + if(this.application.ninja.selectedElements.length === 0) { + this.displayStageProperties(); + } + } + }, + /** * Blur and Key up to handle change in the Element ID field. */ -- cgit v1.2.3