Project/PropertiesDialog.py

changeset 4009
098c303a6857
parent 3809
3d71f2e733b2
child 4021
195a471c327b
diff -r 51a8bbea6e9f -r 098c303a6857 Project/PropertiesDialog.py
--- a/Project/PropertiesDialog.py	Tue Dec 30 11:50:13 2014 +0100
+++ b/Project/PropertiesDialog.py	Tue Dec 30 15:56:06 2014 +0100
@@ -160,8 +160,10 @@
             self.projectTypeComboBox.addItem(
                 projectTypes[projectType], projectType)
         
-        self.projectTypeComboBox.setCurrentIndex(
-            self.projectTypeComboBox.findData(curProjectType))
+        index = self.projectTypeComboBox.findData(curProjectType)
+        if index == -1:
+            index = 0
+        self.projectTypeComboBox.setCurrentIndex(index)
     
     @pyqtSlot(str)
     def on_dirEdit_textChanged(self, txt):

eric ide

mercurial