Hide the description label and reset the text when no cpu is selected
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Dec 2008 16:13:43 +0000 (16:13 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Dec 2008 16:13:43 +0000 (16:13 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2121 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BCpuPage.py

index 05657337d6c0004f7b535c2684dbc3a3f7d7e102..93919c9cf64d7effdd22f9dfb1a4324e83a927c7 100644 (file)
@@ -23,6 +23,7 @@ class BCpuPage(BWizardPage):
     
     def _populateCpuList(self):
         self.pageContent.cpuList.clear()
+        self.pageContent.cpuList.setCurrentItem(None)
         infos = bertos_utils.loadCpuInfos(self._projectInfoRetrieve("SOURCES_PATH"))
         for cpu in infos:
             item = QListWidgetItem(cpu["CPU_NAME"])
@@ -41,12 +42,15 @@ class BCpuPage(BWizardPage):
     
     def _setupUi(self):
         self.pageContent.descriptionLabel.setVisible(False)
+        self.pageContent.descriptionLabel.setText("")
     
     def reloadData(self):
         self._populateCpuList()
         cpuName = self._projectInfoRetrieve("CPU_NAME")
+        self._setupUi()
         if not cpuName is None:
             self._selectItem(cpuName)
+        self.emit(SIGNAL("completeChanged()"))
     
     def isComplete(self):
         if self.pageContent.cpuList.currentRow() != -1: