Fixed an issue in the UI-Previewer. 5_0_x

Sat, 19 Feb 2011 13:42:24 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 19 Feb 2011 13:42:24 +0100
branch
5_0_x
changeset 898
f4e88e4354fe
parent 895
d8deb8c8e907
child 933
47cc0c93e419

Fixed an issue in the UI-Previewer.

Tools/UIPreviewer.py file | annotate | diff | comparison | revisions
diff -r d8deb8c8e907 -r f4e88e4354fe Tools/UIPreviewer.py
--- a/Tools/UIPreviewer.py	Wed Feb 16 19:14:10 2011 +0100
+++ b/Tools/UIPreviewer.py	Sat Feb 19 13:42:24 2011 +0100
@@ -66,8 +66,9 @@
         self.styleCombo.setToolTip(self.trUtf8("Select the GUI Theme"))
         self.styleLayout.addWidget(self.styleCombo)
         self.styleCombo.addItems(list(QStyleFactory().keys()))
-        self.styleCombo.setCurrentIndex(\
-            int(Preferences.Prefs.settings.value('UIPreviewer/style')))
+        currentStyle = Preferences.Prefs.settings.value('UIPreviewer/style')
+        if currentStyle is not None:
+            self.styleCombo.setCurrentIndex(int(currentStyle))
         
         styleSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
         self.styleLayout.addItem(styleSpacer)

eric ide

mercurial