remove pane if it has no tabs left

This commit is contained in:
Justin Palmer
2013-02-11 09:12:06 -08:00
parent 45d6a30a80
commit 52afa8983a

View File

@@ -82,7 +82,9 @@ class TabView extends SortableList
currentDraggedTabIndex = draggedTab.index()
toEditor.editSessions.splice(currentDraggedTabIndex, 0, fromEditor.editSessions.splice(previousDraggedTabIndex, 1)[0])
if fromPaneIndex != toPaneIndex && draggedTab.hasClass('active')
if fromPane.find('.tab').length == 0
fromPane.view().remove()
else if fromPaneIndex != toPaneIndex && draggedTab.hasClass('active')
fromEditor.setActiveEditSessionIndex(0)
@setActiveTab(currentDraggedTabIndex)