Check if the selected configuration parameter is in the current modulue configuration...
[bertos.git] / wizard / BModulePage.py
index 48ad0892db6ec34f19b21532fa764905de1a8033..636b818886adaedad3249df52c5575f55ad3d1bd 100644 (file)
@@ -56,6 +56,7 @@ class BModulePage(BWizardPage):
             checkBox.setChecked(modules[module]["enabled"])
     
     def _fillPropertyTable(self):
+        self.savePage()
         module = self._currentModule()
         configuration = self._projectInfoRetrieve("MODULES")[module]["configuration"]
         configurations = self._projectInfoRetrieve("CONFIGURATIONS")[configuration]
@@ -117,9 +118,11 @@ class BModulePage(BWizardPage):
     
     def _showPropertyDescription(self):
         self._resetPropertyDescription()
-        description = self._projectInfoRetrieve("CONFIGURATIONS")[self._currentModuleConfigurations()][self._currentProperty()]["description"]
-        name = self._currentProperty()
-        self._currentPropertyItem().setText(name + "\n" + description)
+        configurations = self._projectInfoRetrieve("CONFIGURATIONS")[self._currentModuleConfigurations()]
+        if self._currentProperty() in configurations.keys():
+            description = configurations[self._currentProperty()]["description"]
+            name = self._currentProperty()
+            self._currentPropertyItem().setText(name + "\n" + description)
     
     def _setupUi(self):
         self.pageContent.moduleTable.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
@@ -201,4 +204,8 @@ class BModulePage(BWizardPage):
                 unsatisfied |= set([module])
                 if dependency not in unsatisfied:
                     unsatisfied |= self.unselectDependencyCheck(module)
-        return unsatisfied
\ No newline at end of file
+        return unsatisfied
+    
+    def savePage(self):
+        for index in range(self.pageContent.propertyTable.rowCount()):
+            print qvariant_converter.getString(self.pageContent.propertyTable.item(index, 0).data(Qt.UserRole))
\ No newline at end of file