From: duplo Date: Fri, 19 Dec 2008 15:09:01 +0000 (+0000) Subject: Add the cpu in the project infos X-Git-Tag: 2.1.0~571 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=eceb2d8f50f5af6f46dbdd6c0c3b50fbaff20534;p=bertos.git Add the cpu in the project infos git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2111 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 2c884e23..6a544a3a 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -28,13 +28,21 @@ class BCpuPage(BWizardPage): def _connectSignals(self): self.connect(self.pageContent.cpuList, SIGNAL("itemSelectionChanged()"), self.rowChanged) + + def _selectItem(self, cpu): + elements = self.pageContent.cpuList.findItems(cpu, Qt.MatchCaseSensitive) + if len(elements) == 1: + self.pageContent.cpuList.setCurrentItem(elements[0]) def reloadData(self): self._populateCpuList() + cpuName = self._projectInfoRetrieve("CPU_NAME") + if not cpuName is None: + self._selectItem(cpuName) def isComplete(self): if self.pageContent.cpuList.currentRow() != -1: - self._projectInfoStore("CPU_NAME", self.pageContent.cpuList.currentItem()) + self._projectInfoStore("CPU_NAME", self.pageContent.cpuList.currentItem().text()) return True else: return False