X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBModulePage.py;h=6e40c7f128d69831c1242fed721374b43ab708c3;hb=2654dc2eff8a397ed1dd21d0f073bae553acbb61;hp=90493f9a0065835a7cdd39847726f14cdc657c82;hpb=5226e9391e9feec19a3f0448d4e06291abb10c74;p=bertos.git diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index 90493f9a..6e40c7f1 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -80,19 +80,21 @@ class BModulePage(BWizardPage): self.connect(self.pageContent.moduleTree, SIGNAL("itemPressed(QTreeWidgetItem*, int)"), self.fillPropertyTable) self.connect(self.pageContent.moduleTree, SIGNAL("itemPressed(QTreeWidgetItem*, int)"), self.moduleClicked) self.connect(self.pageContent.moduleTree, SIGNAL("itemChanged(QTreeWidgetItem*, int)"), self.dependencyCheck) - # self.connect(self.pageContent.propertyTable, SIGNAL("itemSelectionChanged()"), self.showPropertyDescription) - def reloadData(self): + def reloadData(self, previous_id=None): """ Overload of the BWizardPage reloadData method. """ - try: - QApplication.instance().setOverrideCursor(Qt.WaitCursor) - self.setupUi() - self.loadModuleData() - self.fillModuleTree() - finally: - QApplication.instance().restoreOverrideCursor() + # Check if the user are approaching this page from the previous or the + # next one. + if previous_id is None or previous_id < self.wizard().currentId(): + try: + QApplication.instance().setOverrideCursor(Qt.WaitCursor) + self.setupUi() + self.loadModuleData() + self.fillModuleTree() + finally: + QApplication.instance().restoreOverrideCursor() #### @@ -147,6 +149,7 @@ class BModulePage(BWizardPage): # Set the row count to the current index + 1 self.pageContent.propertyTable.setRowCount(index + 1) item = QTableWidgetItem(configurations[property]["brief"]) + item.setFlags(item.flags() & ~Qt.ItemIsSelectable) item.setToolTip(property) item.setData(Qt.UserRole, qvariant_converter.convertString(property)) self.pageContent.propertyTable.setItem(index, 0, item)