Sat, 29 Aug 2015 15:41:05 +0200
Fixed an issue in the TabView causing multiple green LEDs and an issue in the ListView causing a traceback.
(grafted from bd43fd5b46068965e60d0178111356e4848e5306)
Plugins/ViewManagerPlugins/Listspace/Listspace.py | file | annotate | diff | comparison | revisions | |
Plugins/ViewManagerPlugins/Tabview/Tabview.py | file | annotate | diff | comparison | revisions |
--- a/Plugins/ViewManagerPlugins/Listspace/Listspace.py Fri Aug 28 12:26:10 2015 +0200 +++ b/Plugins/ViewManagerPlugins/Listspace/Listspace.py Sat Aug 29 15:41:05 2015 +0200 @@ -77,11 +77,12 @@ @param widget widget to be made current (QWidget) """ - if isinstance(widget, QScintilla.Editor.Editor): - self.editors.remove(widget) - self.editors.insert(0, widget) - widget = widget.parent() - super(StackedWidget, self).setCurrentWidget(widget) + if widget is not None: + if isinstance(widget, QScintilla.Editor.Editor): + self.editors.remove(widget) + self.editors.insert(0, widget) + widget = widget.parent() + super(StackedWidget, self).setCurrentWidget(widget) def setCurrentIndex(self, index): """
--- a/Plugins/ViewManagerPlugins/Tabview/Tabview.py Fri Aug 28 12:26:10 2015 +0200 +++ b/Plugins/ViewManagerPlugins/Tabview/Tabview.py Sat Aug 29 15:41:05 2015 +0200 @@ -1097,7 +1097,14 @@ self.tabWidgets.remove(tw) tw.close() self.currentTabWidget = self.tabWidgets[i] - self.currentTabWidget.showIndicator(True) + for tw in self.tabWidgets: + tw.showIndicator(tw == self.currentTabWidget) + if self.currentTabWidget is not None: + assembly = self.currentTabWidget.currentWidget() + if assembly is not None: + editor = assembly.getEditor() + if editor is not None: + editor.setFocus(Qt.OtherFocusReason) if len(self.tabWidgets) == 1: self.splitRemoveAct.setEnabled(False) self.nextSplitAct.setEnabled(False)