mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-22 08:28:41 +03:00
Show active item from Pane constructor if state has activeItemUri
This commit is contained in:
parent
33dca9315c
commit
f3f9c2c921
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user