Remove pane when its last item is removed

This commit is contained in:
Nathan Sobo
2013-02-21 11:12:36 -07:00
committed by probablycorey
parent 7d147dd2ce
commit 11a702a2a6
2 changed files with 5 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ class Pane extends View
_.remove(@items, item)
item.destroy?()
@cleanupItemView(item)
@remove() unless @items.length
itemForPath: (path) ->
_.detect @items, (item) -> item.getPath?() is path