From: (no author) <(no author)@38d2e660-2303-0410-9eaa-f027e97ec537> Date: Mon, 13 Jul 2009 12:27:33 +0000 (+0000) Subject: Fix the bug related to the empty version list X-Git-Tag: 2.2.0~213 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d77ff5582a0ba72fb63e48576551b75cb3d833ff;p=bertos.git Fix the bug related to the empty version list git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2755 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index 98c73885..8ce69403 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -192,7 +192,9 @@ class BVersionPage(BWizardPage): if selected and selected == directory: self.setCurrentItem(item) if not selected: - self.setCurrentItem(self.latestVersionItem()) + latest_version_item = self.latestVersionItem() + if latest_version_item: + self.setCurrentItem(latest_version_item) def disableRemoveButton(self): """ @@ -210,7 +212,7 @@ class BVersionPage(BWizardPage): """ Returns the latest BeRTOS version founded. """ - latest_version_item = QTableWidgetItem("") + latest_version_item = None for index in range(self.pageContent.versionList.count()): item = self.pageContent.versionList.item(index) version = item.text().split(" (")[0]