Correct a bug of the stored value
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 17 Apr 2009 10:32:17 +0000 (10:32 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 17 Apr 2009 10:32:17 +0000 (10:32 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2534 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BCpuPage.py

index e490acab29646e4dca3eb963660cf61601081647..d6b3616b18f34ca836452df7d1cd9f0a50124e55 100644 (file)
@@ -84,9 +84,13 @@ class BCpuPage(BWizardPage):
         bertos_utils.loadSourceTree(self.project())
         self.populateCpuList()
         cpu_name = self.projectInfo("CPU_NAME")
+        selected_freq = self.projectInfo("SELECTED_FREQ")
         self.setupUi()
         if not cpu_name is None:
             self.selectItem(cpu_name)
+            if not selected_freq is None:
+                self.setFrequency(selected_freq)
+                self.freq_modified = True
         QApplication.instance().restoreOverrideCursor()
         self.emit(SIGNAL("completeChanged()"))
 
@@ -143,4 +147,7 @@ class BCpuPage(BWizardPage):
         """
         elements = self.pageContent.cpuList.findItems(cpu, Qt.MatchCaseSensitive)
         if len(elements) == 1:
-            self.pageContent.cpuList.setCurrentItem(elements[0])
\ No newline at end of file
+            self.pageContent.cpuList.setCurrentItem(elements[0])
+    
+    def setFrequency(self, frequency):
+        self.pageContent.frequencySpinBox.setValue(long(frequency))
\ No newline at end of file