From 6279b57556c6bb39f10f32b39fb95ff7f1488340 Mon Sep 17 00:00:00 2001 From: duplo Date: Mon, 31 Aug 2009 14:37:20 +0000 Subject: [PATCH] Change the settings merge function git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2827 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BEditingDialog.py | 8 ++++++++ wizard/BModulePage.py | 3 ++- wizard/bertos_utils.py | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/wizard/BEditingDialog.py b/wizard/BEditingDialog.py index d9b4d1bd..a6c47220 100644 --- a/wizard/BEditingDialog.py +++ b/wizard/BEditingDialog.py @@ -44,6 +44,7 @@ from BToolchainPage import BToolchainPage from BVersionPage import BVersionPage import qvariant_converter import BModulePage +import bertos_utils class BEditingDialog(QDialog): @@ -133,6 +134,13 @@ class BEditingDialog(QDialog): ) == QMessageBox.Ok: version_page.setProjectInfo("SOURCES_PATH", version) version_page.setProjectInfo("OLD_SOURCES_PATH", current_version) + project = version_page.project() + modules, lists, configurations, files = project.info("MODULES"), project.info("LISTS"), project.info("CONFIGURATIONS"), project.info("FILES") + bertos_utils.loadSourceTree(version_page.project()) + bertos_utils.loadModuleData(version_page.project(), True) + modules_, lists_, configurations_, files_ = project.info("MODULES"), project.info("LISTS"), project.info("CONFIGURATIONS"), project.info("FILES") + self.module_page.fillModuleTree() + print modules == modules_, lists == lists_, configurations == configurations_, files == files_ def apply(self): createBertosProject(self.module_page.project(), edit=True) diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index 38bc8a53..8daa8d20 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -222,6 +222,7 @@ class BModulePage(BWizardPage): """ Fills the module tree with the module entries separated in categories. """ + self.pageContent.moduleTree.clear() modules = self.projectInfo("MODULES") if not modules: return @@ -496,4 +497,4 @@ class QControlGroup(QObject): Slot called when the value of one of the stored widget changes. It emits another signal. """ - self.emit(SIGNAL("stateChanged"), id) \ No newline at end of file + self.emit(SIGNAL("stateChanged"), id) diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 401713f6..2b7d6767 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -679,7 +679,8 @@ def loadConfigurationInfos(path): def updateConfigurationValues(def_conf, user_conf): for param in def_conf["paramlist"]: - def_conf[param[1]]["value"] = user_conf[param[1]]["value"] + if param[1] in user_conf and "value" in user_conf[param[1]]: + def_conf[param[1]]["value"] = user_conf[param[1]]["value"] return def_conf def findParameterType(parameter): -- 2.25.1