Skip to content

Commit 3e163ab

Browse files
committed
Load ios
1 parent 0fb3ffe commit 3e163ab

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

menus.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def __init__(
145145
self.create_menu(menu_name, options, menu_commands)
146146

147147
# Bind to parent to close dropdowns when clicking outside
148-
self.parent.bind("<Button-1>", self.close_dropdown)
148+
self.parent.bind("<Button-1>", self.close_dropdown, add="+")
149+
self.canvas.bind("<Button-1>", self.close_dropdown, add="+")
149150

150151
def select_microcontroller(self, microcontroller_name):
151152
"""Handler for microcontroller selection."""
@@ -389,6 +390,18 @@ def open_file(self):
389390
)
390391
]
391392
self.board.sketcher.circuit(x_o, y_o, model=model_wire)
393+
elif "io" in key:
394+
model_io = [
395+
(
396+
self.board.sketcher.draw_pin_io,
397+
1,
398+
{
399+
**val,
400+
"matrix": self.board.sketcher.matrix,
401+
},
402+
)
403+
]
404+
self.board.sketcher.circuit(x_o, y_o, model=model_io)
392405
else:
393406
# TODO add IO
394407
print(f"Unspecified component: {key}")

0 commit comments

Comments
 (0)