X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBVersionPage.py;h=fc989a739b5a978bfe472dff402a42cc526c1355;hb=ba2ba183c492049aface3e3d4e1d5f945b43f3d6;hp=e4cb8d2ca90a2b52779ba56f3c0ebca2d04bc10f;hpb=107cf69bcaae23a972ff33a805c60a37bd0a1238;p=bertos.git diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index e4cb8d2c..fc989a73 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,6 +62,7 @@ class BVersionPage(BWizardPage): """ Overload of the BWizardPage reloadData method. """ + self.resetVersionList() self.pageContent.versionList.setCurrentRow(-1) self.fillVersionList() @@ -118,7 +119,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