X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBModulePage.py;h=8e1a80f7e4980352a9d1e3fe7e89dce7ec540b9e;hb=483e0ab79500ed341bab7d9536b6c6239a0ad513;hp=d42cbb61bcec49bf954f0567fbf48495afeea1ba;hpb=5945a0313c8774a741a8bf77b82b96467ad8da3c;p=bertos.git diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index d42cbb61..8e1a80f7 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -219,16 +219,19 @@ class BModulePage(BWizardPage): """ Loads the module data. """ - # Load the module data every time so that if the user changed the cpu - # the right configurations are picked up. - try: - self.project.loadModuleData() - except ModuleDefineException, e: - self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line)) - except EnumDefineException, e: - self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line)) - except ConfigurationDefineException, e: - self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line)) + # Do not load the module data again when the Wizard is in editing mode + # or when it's working on a preset. + if not self.project.edit and not self.project.from_preset: + # Load the module data every time so that if the user changed the cpu + # the right configurations are picked up. + try: + self.project.loadModuleData() + except ModuleDefineException, e: + self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line)) + except EnumDefineException, e: + self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line)) + except ConfigurationDefineException, e: + self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line)) def fillModuleTree(self): """