Use the brief for identify the parameter instead of the constant name...
[bertos.git] / wizard / BCpuPage.py
index 2af1df821f66429327b39ede313afc067798d182..3fc339f25c37b37adda8b500381b5085a07df6c3 100644 (file)
@@ -27,7 +27,7 @@ class BCpuPage(BWizardPage):
     def _populateCpuList(self):
         self.pageContent.cpuList.clear()
         self.pageContent.cpuList.setCurrentItem(None)
-        infos = bertos_utils.loadCpuInfos(self._projectInfoRetrieve("SOURCES_PATH"))
+        infos = bertos_utils.loadCpuInfos(self._project())
         for cpu in infos:
             item = QListWidgetItem(cpu["CPU_NAME"])
             item.setData(Qt.UserRole, qvariant_converter.convertDict(cpu))
@@ -47,6 +47,7 @@ class BCpuPage(BWizardPage):
         self.pageContent.descriptionLabel.setText("")
     
     def reloadData(self):
+        bertos_utils.loadSourceTree(self._project())
         self._populateCpuList()
         cpuName = self._projectInfoRetrieve("CPU_NAME")
         self._setupUi()
@@ -63,6 +64,7 @@ class BCpuPage(BWizardPage):
                 if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode:
                     infos[key] = qvariant_converter.getString(value)
             self._projectInfoStore("CPU_INFOS", infos)
+            self._projectInfoStore("CPU_NAME", unicode(self.pageContent.cpuList.currentItem().text()))
             return True
         else:
             return False