From: duplo Date: Wed, 16 Sep 2009 16:03:27 +0000 (+0000) Subject: Fix bug related to BeRTOS version removal X-Git-Tag: 2.2.0~14 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=02812c751cc3ca9dfba39748d3ddca22f5704f1a;p=bertos.git Fix bug related to BeRTOS version removal git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2954 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index 37097c4f..d11d1ff8 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -117,7 +117,8 @@ class BVersionPage(BWizardPage): Slot called when the user remove a BeRTOS version. """ item = self.pageContent.versionList.takeItem(self.pageContent.versionList.currentRow()) - self.deleteVersion(qvariant_converter.getString(item.data(Qt.UserRole))) + if item: + self.deleteVersion(qvariant_converter.getString(item.data(Qt.UserRole))) self.emit(SIGNAL("completeChanged()")) def rowChanged(self): @@ -151,8 +152,8 @@ class BVersionPage(BWizardPage): """ Removes the given directory from the QSettings. """ - versions = self.versions() - versions.remove(directory) + versions = [os.path.normpath(path) for path in self.versions()] + versions.remove(os.path.normpath(directory)) self.setVersions(versions) def resetVersionList(self):