X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=inline;f=wizard%2FBModulePage.py;h=19d0c3a50862715d2c608330f9b2cc3571f6d134;hb=b04beb3ec4c8e96e584387b715e470cf60599dee;hp=9ee813ada3c922b630323fdd3d9f50867b0257c6;hpb=f49c05f2b6fcd22c94d01e6e59f97d5b0c97f1ef;p=bertos.git diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index 9ee813ad..19d0c3a5 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -100,9 +100,9 @@ class BModulePage(BWizardPage): spinBox.setSuffix("L") spinBox.setValue(int(configurations[property]["value"].replace("L", ""))) - def _savePage(self, previousRow, previousColumn): + def _saveData(self, previousRow, previousColumn): module = self._module(previousRow) - moduleConfigurations = self._projectInfoRetrieve("CONFIGURATIONS")[self._configurations(module)] + moduleConfigurations = self._configurations(module) for index in range(self.pageContent.propertyTable.rowCount()): parameter = qvariant_converter.getString(self.pageContent.propertyTable.item(index, 0).data(Qt.UserRole)) if "type" not in moduleConfigurations[parameter]["informations"].keys() or moduleConfigurations[parameter]["informations"]["type"] == "int": @@ -117,14 +117,14 @@ class BModulePage(BWizardPage): def _pageChanged(self, row, column, previousRow, previousColumn): if previousRow != -1 and previousColumn != -1: - self._savePage(previousRow, previousColumn) + self._saveData(previousRow, previousColumn) self._fillPropertyTable() def _currentModule(self): return unicode(self.pageContent.moduleTable.item(self.pageContent.moduleTable.currentRow(), 1).text()) def _currentModuleConfigurations(self): - return self._configurations(self._currentModule())["configurations"] + return self._configurations(self._currentModule()) def _currentProperty(self): return qvariant_converter.getString(self.pageContent.propertyTable.item(self.pageContent.propertyTable.currentRow(), 0).data(Qt.UserRole)) @@ -136,7 +136,8 @@ class BModulePage(BWizardPage): return unicode(self.pageContent.moduleTable.item(row, 1).text()) def _configurations(self, module): - return self._projectInfoRetrieve("MODULES")[module]["configuration"] + configuration = self._projectInfoRetrieve("MODULES")[module]["configuration"] + return self._projectInfoRetrieve("CONFIGURATIONS")[configuration] def _resetPropertyDescription(self): for index in range(self.pageContent.propertyTable.rowCount()): @@ -145,7 +146,7 @@ class BModulePage(BWizardPage): def _showPropertyDescription(self): self._resetPropertyDescription() - configurations = self._projectInfoRetrieve("CONFIGURATIONS")[self._currentModuleConfigurations()] + configurations = self._currentModuleConfigurations() if self._currentProperty() in configurations.keys(): description = configurations[self._currentProperty()]["description"] name = self._currentProperty()