Call hide on the views instead of the jQuery collection

This ensures that views with custom ::hide methods can invoke special
behavior.
This commit is contained in:
Kevin Sawicki & Nathan Sobo 2014-05-21 17:11:36 -06:00
parent a8538a1361
commit 68c3113b75

View File

@ -149,7 +149,7 @@ class PaneView extends View
hasFocus = @hasFocus() hasFocus = @hasFocus()
item.on? 'title-changed', @activeItemTitleChanged item.on? 'title-changed', @activeItemTitleChanged
view = @viewForItem(item) view = @viewForItem(item)
@itemViews.children().not(view).hide() otherView.hide() for otherView in @itemViews.children().not(view).views()
@itemViews.append(view) unless view.parent().is(@itemViews) @itemViews.append(view) unless view.parent().is(@itemViews)
view.show() if @attached view.show() if @attached
view.focus() if hasFocus view.focus() if hasFocus