75 """ |
75 """ |
76 Public method to set the current widget. |
76 Public method to set the current widget. |
77 |
77 |
78 @param widget widget to be made current (QWidget) |
78 @param widget widget to be made current (QWidget) |
79 """ |
79 """ |
80 if isinstance(widget, QScintilla.Editor.Editor): |
80 if widget is not None: |
81 self.editors.remove(widget) |
81 if isinstance(widget, QScintilla.Editor.Editor): |
82 self.editors.insert(0, widget) |
82 self.editors.remove(widget) |
83 widget = widget.parent() |
83 self.editors.insert(0, widget) |
84 super(StackedWidget, self).setCurrentWidget(widget) |
84 widget = widget.parent() |
|
85 super(StackedWidget, self).setCurrentWidget(widget) |
85 |
86 |
86 def setCurrentIndex(self, index): |
87 def setCurrentIndex(self, index): |
87 """ |
88 """ |
88 Public method to set the current widget by its index. |
89 Public method to set the current widget by its index. |
89 |
90 |