From 02812c751cc3ca9dfba39748d3ddca22f5704f1a Mon Sep 17 00:00:00 2001 From: duplo Date: Wed, 16 Sep 2009 16:03:27 +0000 Subject: [PATCH] Fix bug related to BeRTOS version removal git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2954 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BVersionPage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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): -- 2.25.1