From fdfcc935960d670a4c724374f10cf9d9df3ec39f Mon Sep 17 00:00:00 2001 From: janik Date: Thu, 9 Apr 2026 16:47:43 +0700 Subject: [PATCH] default browse dialog to project directory Co-Authored-By: Claude Opus 4.6 (1M context) --- plugins/pin_validator_action.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/pin_validator_action.py b/plugins/pin_validator_action.py index 283f4a0..a45eb24 100644 --- a/plugins/pin_validator_action.py +++ b/plugins/pin_validator_action.py @@ -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, )