mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Add Project.getState() and make Project.serialize clone state
This commit is contained in:
@@ -71,8 +71,8 @@ class Project
|
||||
for insertedBuffer, i in inserted
|
||||
@addBufferAtIndex(deserialize(insertedBuffer), index + i, updateState: false)
|
||||
|
||||
serialize: ->
|
||||
@state
|
||||
serialize: -> @state.clone()
|
||||
getState: -> @state
|
||||
|
||||
# Retrieves the project path.
|
||||
#
|
||||
|
||||
@@ -123,7 +123,7 @@ window.deserializeEditorWindow = ->
|
||||
window.project = deserialize(windowState.get('project'))
|
||||
unless window.project?
|
||||
window.project = new Project(atom.getLoadSettings().initialPath)
|
||||
windowState.set('project', window.project.serialize())
|
||||
windowState.set('project', window.project.getState())
|
||||
|
||||
window.rootView = deserialize(windowState.get('rootView'))
|
||||
unless window.rootView?
|
||||
|
||||
Reference in New Issue
Block a user