Skip to content

Commit

Permalink
fix bug where current widget is None
Browse files Browse the repository at this point in the history
  • Loading branch information
sccolbert committed Oct 16, 2013
1 parent d21269a commit 64cfe87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enaml/qt/qt_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,11 @@ def init_selected_tab(self):
if d.selected_tab:
self.set_selected_tab(d.selected_tab)
else:
current = self.widget.currentWidget()
name = current.objectName() if current is not None else u''
self._guard |= CHANGE_GUARD
try:
d.selected_tab = self.widget.currentWidget().objectName()
d.selected_tab = name
finally:
self._guard &= ~CHANGE_GUARD

Expand Down

0 comments on commit 64cfe87

Please sign in to comment.