Permalink
Browse files

BUG: Checking for editor_area attribute of QTabBar instance crashes.

When the widget in focus is not a DraggableTabBar, it won't have an
instance editor_area and the code in the previous commit crashes.
  • Loading branch information...
1 parent 3db9f33 commit e8c6bd772f973cc36dcb82bf0199c54c2f94090e @punchagan punchagan committed Dec 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 pyface/ui/qt4/tasks/split_editor_area_pane.py
@@ -321,7 +321,7 @@ def _focus_changed(self, old, new):
if new.editor_area == self:
self.active_tabwidget = new
elif isinstance(new, QtGui.QTabBar):
- if new.parent().editor_area == self:
+ if self.control.isAncestorOf(new):
self.active_tabwidget = new.parent()
else:
# check if any of the editor widgets have focus.

0 comments on commit e8c6bd7

Please sign in to comment.