Fix random file inclusion in project editing.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 30 Mar 2010 09:44:23 +0000 (09:44 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 30 Mar 2010 09:44:23 +0000 (09:44 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3321 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 5c03074d25876a37399c87ffb194daccc38025ce..8a26aa1bf2217919b906911aa6b8a320f323f05c 100644 (file)
@@ -112,12 +112,10 @@ def setEnabledModules(project_info, enabled_modules):
     files = {}
     for module, information in modules.items():
         information["enabled"] = module in enabled_modules
-       for dependency in information["depends"]:
-            if not dependency in modules:
-               if dependency in files:
-                   files[dependency] += 1
-               else:
-                   files[dependency] = 1
+        if information["enabled"]:
+            for dependency in information["depends"]:
+                if not dependency in modules:
+                    files[dependency] = files.get(dependency, 0) + 1
     project_info.setInfo("MODULES", modules)
     project_info.setInfo("FILES", files)