Utilizzate le configurazioni in memoria, nel tentativo di modificare la versione...
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 3 Sep 2009 14:35:21 +0000 (14:35 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 3 Sep 2009 14:35:21 +0000 (14:35 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2875 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BEditingDialog.py

index eacfbfe29b9a34c392c886d4229a4faeee76ae10..46c184d25e10c345abb7194c6d0e1c4d42e475e1 100644 (file)
@@ -135,8 +135,18 @@ class BEditingDialog(QDialog):
                     version_page.setProjectInfo("SOURCES_PATH", version)
                     version_page.setProjectInfo("OLD_SOURCES_PATH", current_version)
                     enabled_modules = bertos_utils.enabledModules(version_page.project())
+                    old_configuration = version_page.projectInfo("CONFIGURATIONS")
                     bertos_utils.loadSourceTree(version_page.project())
-                    bertos_utils.loadModuleData(version_page.project(), True)
+                    bertos_utils.loadModuleData(version_page.project())
+                    new_configuration = version_page.projectInfo("CONFIGURATIONS")
+                    merged_configuration = {}
+                    for conf in new_configuration:
+                        if conf in old_configuration:
+                            configuration = bertos_utils.updateConfigurationValues(new_configuration[conf], old_configuration[conf])
+                        else:
+                            configuration = new_configuration[conf]
+                        merged_configuration[conf] = configuration
+                    version_page.setProjectInfo("CONFIGURATIONS", merged_configuration)
                     bertos_utils.setEnabledModules(version_page.project(), enabled_modules)
                     self.module_page.fillModuleTree()