Reload the source tree only the first time is needed
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 10 Feb 2009 13:11:42 +0000 (13:11 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 10 Feb 2009 13:11:42 +0000 (13:11 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2337 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BCpuPage.py
wizard/bertos_utils.py

index 17759b08485ab0071a3fc1ad7f0472d770bbc8cf..41434967ea07cac17b2ea9b2765f8268cc69de7f 100644 (file)
@@ -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()
index ad8277fa2010d98d5d46b5e0be8320e940a52915..e635423f01880c8b7aad2fdda0f8dcedde7b5c25 100644 (file)
@@ -133,11 +133,12 @@ def getToolchainInfo(output):
         info["thread"] = thread[0].split("Thread model: ")[1]
     return info
 
+def loadSourceTree(project):
+    fileList = [f for f in os.walk(project.info("SOURCES_PATH"))]
+    project.setInfo("FILE_LIST", fileList)
+
 def findDefinitions(ftype, project):
     L = project.info("FILE_LIST")
-    if L is None:
-        L = [f for f in os.walk(project.info("SOURCES_PATH"))]
-        project.setInfo("FILE_LIST", L)
     definitions = []
     for element in L:
         for filename in element[2]: