X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBVersionPage.py;h=6333d7492139066daa2a35284b201742228660f3;hb=f8f104d271616012acd82fe3f2249a91f78baf90;hp=e4cb8d2ca90a2b52779ba56f3c0ebca2d04bc10f;hpb=107cf69bcaae23a972ff33a805c60a37bd0a1238;p=bertos.git diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index e4cb8d2c..6333d749 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -36,7 +36,7 @@ class BVersionPage(BWizardPage): """ if self.pageContent.versionList.currentRow() != -1: sources_path = qvariant_converter.getString(self.pageContent.versionList.currentItem().data(Qt.UserRole)) - ## Remove the trailing slash + # Remove the trailing slash if sources_path.endswith(os.sep): sources_path = sources_path[:-1] self.setProjectInfo("SOURCES_PATH", sources_path) @@ -62,9 +62,16 @@ class BVersionPage(BWizardPage): """ Overload of the BWizardPage reloadData method. """ + self.resetVersionList() self.pageContent.versionList.setCurrentRow(-1) self.fillVersionList() + def setupUi(self): + """ + Overload of the BWizardPage setupUi method. + """ + self.pageContent.updateButton.setVisible(False) + #### ## Slots ## @@ -118,7 +125,13 @@ class BVersionPage(BWizardPage): versions = self.versions() versions.remove(directory) self.setVersions(versions) - + + def resetVersionList(self): + """ + Remove all the version entries from the list. + """ + self.pageContent.versionList.clear() + def insertListElement(self, directory): """ Inserts the given directory in the version list and returns the