Change the settings merge function
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 31 Aug 2009 14:37:20 +0000 (14:37 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 31 Aug 2009 14:37:20 +0000 (14:37 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2827 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BEditingDialog.py
wizard/BModulePage.py
wizard/bertos_utils.py

index d9b4d1bd33c86413e0a64638168b86dfc5d96f85..a6c472203624a74df37e550a1d46eaad6fe53ffa 100644 (file)
@@ -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)
index 38bc8a531183b6673ee7457838c9ec9ee63fbc1c..8daa8d206e25c85bf14e058dcac57eed01c1d0b5 100644 (file)
@@ -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)
index 401713f61a4f010a21a68440357b7f2fd13f7f7f..2b7d6767e2a8235e9b58850f7ef74eb2878b6e23 100644 (file)
@@ -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):