RootView (instead of Window) handles opening an empty buffer if no path is given.

This commit is contained in:
Corey Johnson
2012-09-25 12:36:54 -07:00
parent cf48665a03
commit aa7325b355
2 changed files with 5 additions and 2 deletions

View File

@@ -42,7 +42,11 @@ class RootView extends View
@handleEvents()
@setTitle()
@loadUserConfiguration()
@open(pathToOpen) if fs.isFile(pathToOpen) unless suppressOpen
if pathToOpen
@open(pathToOpen) if fs.isFile(pathToOpen) and not suppressOpen
else
@open()
serialize: ->
projectPath: @project?.getPath()

View File

@@ -49,7 +49,6 @@ windowAdditions =
RootView.deserialize(rootViewState)
else
new RootView(pathToOpen)
@rootView.open() unless pathToOpen
$(@rootViewParentSelector).append @rootView