From d77ff5582a0ba72fb63e48576551b75cb3d833ff Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@38d2e660-2303-0410-9eaa-f027e97ec537> Date: Mon, 13 Jul 2009 12:27:33 +0000 Subject: [PATCH] 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 --- wizard/BVersionPage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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] -- 2.25.1