Add link management: create, select, delete with undo/redo

Implement full link workflow between component slots on the wiresheet:
- Link Mark / Link From / Link To context menu items for creating links
- Link dialog with slot type validation and source/target swap button
- Selectable link wires (click to highlight in red) with right-click delete
- Undo/redo support for both add and delete link operations
- Component deletion already cascades to remove related links

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 16:34:17 +03:00
co-authored by Claude Opus 4.6
parent e43c5e17a4
commit 424caf777c
6 changed files with 342 additions and 8 deletions
+11
View File
@@ -161,6 +161,17 @@ def load_schema_kits_and_manifests():
compile_schema_registry(manifest_paths)
def get_all_slots_for_type(type_str):
"""Returns every slot for a type as (name, type_string) tuples, for the link dialog."""
if type_str not in app_state.final_components_registry:
return []
return [
(slot["name"], slot["type"])
for slot in app_state.final_components_registry[type_str]
if slot["name"]
]
def get_slots_for_type(type_str, linked_slots=()):
"""
Returns the slots worth painting for a given type, prefixed with double-digit