From 8757efb3d6553910c19f0d225d34c91e4e89fb34 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 10 Feb 2009 13:11:42 +0000 Subject: [PATCH] Reload the source tree only the first time is needed git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2337 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BCpuPage.py | 1 + wizard/bertos_utils.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 17759b08..41434967 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -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() diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index ad8277fa..e635423f 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -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]: -- 2.25.1