Add recursive dependency check
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 23 Jan 2009 17:17:51 +0000 (17:17 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 23 Jan 2009 17:17:51 +0000 (17:17 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2219 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BModulePage.py

index 974fc192c3ac2c20c09c5ab24f7a9c1df83676cb..6477326e58f74022ce5f8204e4b153fe6b5234b7 100644 (file)
@@ -156,6 +156,14 @@ class BModulePage(BWizardPage):
         if len(unsatisfied) > 0:
             self._selectionDependencyFail(selectedModule, unsatisfied)
     
+    def _moduleUnselected(self, unselectedModule):
+        modules = self._projectInfoRetrieve("MODULES")
+        modules[unselectedModule]["enabled"] = False
+        self._projectInfoStore("MODULES", modules)
+        unsatisfied = self.unselectDependencyCheck(unselectedModule)
+        if len(unsatisfied) > 0:
+            self._unselectionDependencyFail(unselectedModule, unsatisfied)
+    
     def _selectionDependencyFail(self, selectedModule, unsatisfiedModules):
         messageString = "The module " + selectedModule + " needs the following modules:\n" + \
                         ", ".join(unsatisfiedModules) + ".\nDo you want to resolve autmatically the prolem?"
@@ -166,15 +174,7 @@ class BModulePage(BWizardPage):
         messageBox.addButton(QMessageBox.Yes)
         messageBox.addButton(QMessageBox.No)
         messageBox.exec_()
-    
-    def _moduleUnselected(self, unselectedModule):
-        modules = self._projectInfoRetrieve("MODULES")
-        modules[unselectedModule]["enabled"] = False
-        self._projectInfoStore("MODULES", modules)
-        unsatisfied = self.unselectDependencyCheck(unselectedModule)
-        if len(unsatisfied) > 0:
-            self._unselectionDependencyFail(unselectedModule, unsatisfied)
-    
+
     def _unselectionDependencyFail(self, unselectedModule, unsatisfiedModules):
         messageString = "The module " + unselectedModule + " is needed by the following modules:\n" + \
                         ", ".join(unsatisfiedModules) + ".\nDo you want to resolve autmatically the prolem?"