diff options
author | Valerio Virgillito | 2012-05-18 01:36:05 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-18 01:36:05 -0700 |
commit | 24d1873302b2fffc25d254e15e8aa36f59eedb88 (patch) | |
tree | 29658da7910ff5bd5709ccebd758a9d46ee2ff4f /js/ninja.reel | |
parent | e9dddef38507cafcf5702ce6a512b4005609acef (diff) | |
download | ninja-24d1873302b2fffc25d254e15e8aa36f59eedb88.tar.gz |
fixed a switch documents bug where the layout was getting called before setting the container.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 067a005f..6d41cd53 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -175,7 +175,7 @@ exports.Ninja = Montage.create(Component, { | |||
175 | this.eventManager.addEventListener("selectTool", this, false); | 175 | this.eventManager.addEventListener("selectTool", this, false); |
176 | this.eventManager.addEventListener("selectSubTool", this, false); | 176 | this.eventManager.addEventListener("selectSubTool", this, false); |
177 | this.eventManager.addEventListener("onOpenDocument", this, false); | 177 | this.eventManager.addEventListener("onOpenDocument", this, false); |
178 | this.eventManager.addEventListener("switchDocument", this, false); | 178 | this.eventManager.addEventListener("onSwitchDocument", this, false); |
179 | 179 | ||
180 | this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); | 180 | this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); |
181 | this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); | 181 | this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); |
@@ -291,13 +291,15 @@ exports.Ninja = Montage.create(Component, { | |||
291 | } | 291 | } |
292 | }, | 292 | }, |
293 | 293 | ||
294 | handleSwitchDocument: { | 294 | handleOnSwitchDocument: { |
295 | value: function() { | 295 | value: function() { |
296 | this.currentDocument = this.documentController.activeDocument; | 296 | this.currentDocument = this.documentController.activeDocument; |
297 | 297 | ||
298 | if(this.currentDocument.documentRoot) { | 298 | if(this.currentDocument.documentRoot) { |
299 | this._currentSelectedContainer = this.selectionController._currentSelectedContainer = this.currentDocument.documentRoot; | 299 | this._currentSelectedContainer = this.selectionController._currentSelectedContainer = this.currentDocument.documentRoot; |
300 | } | 300 | } |
301 | |||
302 | NJevent("switchDocument"); | ||
301 | } | 303 | } |
302 | }, | 304 | }, |
303 | 305 | ||