Fixed an issue in the TabView causing multiple green LEDs and an issue in the ListView causing a traceback.

Sat, 29 Aug 2015 15:41:05 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 29 Aug 2015 15:41:05 +0200
changeset 4403
bd43fd5b4606
parent 4402
ad524553e765
child 4405
c110bcfaad81

Fixed an issue in the TabView causing multiple green LEDs and an issue in the ListView causing a traceback.

Plugins/ViewManagerPlugins/Listspace/Listspace.py file | annotate | diff | comparison | revisions
Plugins/ViewManagerPlugins/Tabview/Tabview.py file | annotate | diff | comparison | revisions
diff -r ad524553e765 -r bd43fd5b4606 Plugins/ViewManagerPlugins/Listspace/Listspace.py
--- a/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Fri Aug 28 16:38:57 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):
         """
diff -r ad524553e765 -r bd43fd5b4606 Plugins/ViewManagerPlugins/Tabview/Tabview.py
--- a/Plugins/ViewManagerPlugins/Tabview/Tabview.py	Fri Aug 28 16:38:57 2015 +0200
+++ b/Plugins/ViewManagerPlugins/Tabview/Tabview.py	Sat Aug 29 15:41:05 2015 +0200
@@ -1107,7 +1107,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)

eric ide

mercurial