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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 29 Aug 2015 15:41:05 +0200
branch
6_0_x
changeset 4404
9a6136c369ce
parent 4401
4c0aea7ff05f
child 4406
cb7b6c556fc5

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)

eric ide

mercurial