From eceb2d8f50f5af6f46dbdd6c0c3b50fbaff20534 Mon Sep 17 00:00:00 2001 From: duplo Date: Fri, 19 Dec 2008 15:09:01 +0000 Subject: [PATCH] Add the cpu in the project infos git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2111 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BCpuPage.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.25.1