default browse dialog to project directory

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
janik
2026-04-09 16:47:43 +07:00
parent d4a209fb71
commit fdfcc93596
+1 -8
View File
@@ -126,16 +126,9 @@ class _SetupDialog(wx.Dialog):
self.ioc_path = self._history[idx]
def _on_browse(self, _evt):
start = self._project_dir
for _ in range(4):
up = os.path.dirname(start)
if up == start:
break
start = up
dlg = wx.FileDialog(
self, "Select STM32CubeMX .ioc file",
defaultDir=start,
defaultDir=self._project_dir,
wildcard="IOC files (*.ioc)|*.ioc|All files (*.*)|*.*",
style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST,
)