From 39c1c5711f7cd8b27348ba8f28fbc06491174df2 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 20 Apr 2010 14:43:39 +0000 Subject: [PATCH] Select the current preset when the user go back after preset selection git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3483 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BBoardPage.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wizard/BBoardPage.py b/wizard/BBoardPage.py index e565eb82..9e70a68a 100644 --- a/wizard/BBoardPage.py +++ b/wizard/BBoardPage.py @@ -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) -- 2.25.1