Remember the selected toolchain also when returning back
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 31 Mar 2009 09:39:44 +0000 (09:39 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 31 Mar 2009 09:39:44 +0000 (09:39 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2449 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BToolchainPage.py

index 18935ec5f598db267642404576bacd0156429119..7cd722a15fb68f84d3d60f83a8d0c5f5fa2351f1 100644 (file)
@@ -34,10 +34,13 @@ class BToolchainPage(BWizardPage):
     
     def _populateToolchainList(self):
         toolchains = self.toolchains()
+        sel_toolchain = self._projectInfoRetrieve("TOOLCHAIN")
         for key, value in toolchains.items():
             item = QListWidgetItem(key)
             item.setData(Qt.UserRole, qvariant_converter.convertStringDict({"path": key}))
             self.pageContent.toolchainList.addItem(item)
+            if sel_toolchain is not None and sel_toolchain["path"] == key:
+                self.pageContent.toolchainList.setCurrentItem(item)
             if value:
                 self.validateToolchain(self.pageContent.toolchainList.row(item))