From f3f9c2c9212e82ff40ed66ceae7fb6bcd0a8d2ca Mon Sep 17 00:00:00 2001 From: Kevin Sawicki & Nathan Sobo Date: Wed, 26 Jun 2013 14:05:11 -0600 Subject: [PATCH] Show active item from Pane constructor if state has activeItemUri --- src/app/pane.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/pane.coffee b/src/app/pane.coffee index b09669b10..8b6471945 100644 --- a/src/app/pane.coffee +++ b/src/app/pane.coffee @@ -17,8 +17,6 @@ class Pane extends View @deserialize: (state) -> pane = new Pane(state) - if activeItemUri = state.get('activeItemUri') - pane.showItemForUri(activeItemUri) pane.focusOnAttach = true if state.get('focused') pane @@ -48,7 +46,10 @@ class Pane extends View @showItemForUri(value) if key is 'activeItemUri' @viewsByClassName = {} - @showItem(@items[0]) if @items.length > 0 + if activeItemUri = @state.get('activeItemUri') + @showItemForUri(activeItemUri) + else + @showItem(@items[0]) if @items.length > 0 @command 'core:close', @destroyActiveItem @command 'core:save', @saveActiveItem