Fix ticket #97.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 14 Jun 2010 08:54:40 +0000 (08:54 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 14 Jun 2010 08:54:40 +0000 (08:54 +0000)
Now when a module is automatically unselected the font is reverted to normal (not bold).

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3923 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BModulePage.py

index 6e40c7f128d69831c1242fed721374b43ab708c3..72b0f9da950bde5cdf74b5fc10c5030468b223a7 100644 (file)
@@ -410,6 +410,9 @@ class BModulePage(BWizardPage):
         item.setFont(0, font)
         self.pageContent.moduleTree.blockSignals(False)
 
+    def isBold(self, item):
+        return item.font(0).bold()
+
     def moduleSelected(self, selectedModule):
         """
         Resolves the selection dependencies.
@@ -473,9 +476,14 @@ class BModulePage(BWizardPage):
                         modules[module]["enabled"] = False
                     for category in range(self.pageContent.moduleTree.topLevelItemCount()):
                         item = self.pageContent.moduleTree.topLevelItem(category)
+                        self.setBold(item, False)
                         for child in range(item.childCount()):
                             if unicode(item.child(child).text(0)) in unsatisfied:
+                                self.setBold(item.child(child), False)
                                 item.child(child).setCheckState(0, Qt.Unchecked)
+                            else:
+                                if self.isBold(item.child(child)):
+                                    self.setBold(item, True)
                     for module, param in unsatisfied_params:
                         configuration_file = self.projectInfo("MODULES")[module]["configuration"]
                         configurations = self.projectInfo("CONFIGURATIONS")