Skip to content

Commit 5bf3aae

Browse files
MitjaNemecqu1ck
authored andcommitted
make find_pcbnew_window() robust to case
With some KiCad versions on some systems the pcbnew window goes under the name "PcbNew". Notice the uppercase N. More info at [https://github.com/MitjaNemec/Kicad_action_plugins/issues/22](https://github.com/MitjaNemec/Kicad_action_plugins/issues/22)
1 parent 2c13a9a commit 5bf3aae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

InteractiveHtmlBom/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def check_for_bom_button():
1414
# https://kicad.mmccoo.com/2017/03/05/adding-your-own-command-buttons-to-the-pcbnew-gui/
1515
def find_pcbnew_window():
1616
windows = wx.GetTopLevelWindows()
17-
pcbneww = [w for w in windows if "Pcbnew" in w.GetTitle()]
17+
pcbneww = [w for w in windows if "pcbnew" in w.GetTitle().lower()]
1818
if len(pcbneww) != 1:
1919
return None
2020
return pcbneww[0]

0 commit comments

Comments
 (0)