Select the current preset when the user go back after preset selection
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 20 Apr 2010 14:43:39 +0000 (14:43 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 20 Apr 2010 14:43:39 +0000 (14:43 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3483 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BBoardPage.py

index e565eb82eca57af2d7d949c0dcfcffb0580fd34b..9e70a68a276e017a28fc4186f32dd0a994da3a31 100644 (file)
@@ -129,11 +129,14 @@ class BBoardPage(BWizardPage):
             self._createPresetNode(self.pageContent.boardTree, obj)
 
     def _createPresetNode(self, parent, obj):
+        selected_item_name = self.projectInfo("PROJECT_PRESET")
         item_name = obj["info"].get("name", obj["info"]["filename"])
         item = QTreeWidgetItem(parent, [item_name]) 
         item.setIcon(0, QIcon(self._getNodeIcon(obj)))
         children_dict = obj["children"]
         item.setData(0, Qt.UserRole, qvariant_converter.convertDict(obj["info"]))
+        if obj["info"]["path"] == selected_item_name:
+            self.pageContent.boardTree.setCurrentItem(item)
         for child in children_dict:
             self._createPresetNode(item, child)