Fix bug related to BeRTOS version removal
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 16 Sep 2009 16:03:27 +0000 (16:03 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 16 Sep 2009 16:03:27 +0000 (16:03 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2954 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BVersionPage.py

index 37097c4fb0ccd70d4de3cbd680998f42e80d7fa4..d11d1ff8b219d808e9839ce3347376f95e427d84 100644 (file)
@@ -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):