Fixed an issue causing a wrong item selected in the configuration dialog.

Sun, 12 Apr 2015 16:59:06 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 12 Apr 2015 16:59:06 +0200
changeset 4214
b8fd47f8b707
parent 4213
0bbb56fc9e65
child 4216
bca19a75be32

Fixed an issue causing a wrong item selected in the configuration dialog.

Preferences/ConfigurationDialog.py file | annotate | diff | comparison | revisions
--- a/Preferences/ConfigurationDialog.py	Sat Apr 11 14:33:38 2015 +0200
+++ b/Preferences/ConfigurationDialog.py	Sun Apr 12 16:59:06 2015 +0200
@@ -379,6 +379,7 @@
                 pitm = self.configList
             self.itmDict[key] = ConfigurationPageItem(pitm, pageData[0], key,
                                                       pageData[1])
+            self.itmDict[key].setData(0, Qt.UserRole, key)
             self.itmDict[key].setExpanded(True)
         self.configList.sortByColumn(0, Qt.AscendingOrder)
         
@@ -627,8 +628,9 @@
                 items = self.configList.findItems(
                     pageData[0],
                     Qt.MatchFixedString | Qt.MatchRecursive)
-                if items:
-                    self.configList.setCurrentItem(items[0])
+                for item in items:
+                    if item.data(0, Qt.UserRole) == pageName:
+                        self.configList.setCurrentItem(item)
         self.configStack.setCurrentWidget(page)
         ssize = self.scrollArea.size()
         if self.scrollArea.horizontalScrollBar():

eric ide

mercurial