Find destination editor in single query

This commit is contained in:
Kevin Sawicki 2013-02-12 12:25:46 -08:00
parent 1f4aedeb10
commit 85f404daf4

View File

@ -89,9 +89,7 @@ class TabView extends SortableList
fromEditor.moveEditSessionToIndex(fromIndex, toIndex)
fromEditor.focus()
else
toPane = $(rootView.find('.pane')[toPaneIndex])
toEditor = toPane.find('.editor').view()
toEditor = rootView.find(".pane:eq(#{toPaneIndex}) > .editor").view()
unless @containsEditSession(toEditor, fromEditor.editSessions[draggedTab.index()])
fromEditor.moveEditSessionToEditor(draggedTab.index(), toEditor, droppedNearTab.index() + 1)
toEditor.focus()