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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user