fix: Richtung und Kante für ausgewählte Segmente bearbeiten

- Kanten-/Richtungsbuttons ändern das aktive Segment statt nur den Default
- Toolbar spiegelt Richtung und Kante der Auswahl
- Statusleiste zeigt Richtung und Kante des ausgewählten Segments
- Regressionstests für Toolbar-Sync und Modelländerung ergänzt
This commit is contained in:
torsten 2026-10-30 07:56:24 +01:00
parent 18efa6ae3c
commit 5face42141
3 changed files with 111 additions and 12 deletions

View file

@ -299,6 +299,49 @@ func _run() -> void:
"flipped arc lies on the other side of the chord"
)
controller.select_segment(arc_right.segment_id)
_check(
controller.get_selected_segment() == arc_right,
"a backward/inside segment can be selected"
)
_check(
controller.backward_button.button_pressed,
"toolbar shows the selected segment direction"
)
_check(
controller.inside_button.button_pressed,
"toolbar shows the selected segment edge"
)
_check(
not controller.forward_button.button_pressed,
"opposite direction button is not pressed"
)
_check(
not controller.outside_button.button_pressed,
"opposite edge button is not pressed"
)
controller.outside_button.pressed.emit()
controller.forward_button.pressed.emit()
_check(
arc_right.edge == PathSegment.Edge.OUTSIDE,
"edge button edits the selected segment"
)
_check(
arc_right.direction == PathSegment.Direction.FORWARD,
"direction button edits the selected segment"
)
_check(
controller.status_label.text.contains("vorwärts")
and controller.status_label.text.contains("außen"),
"status bar shows the edited direction and edge"
)
_check(
controller.outside_button.button_pressed
and controller.forward_button.button_pressed,
"toolbar stays in sync after editing"
)
controller.set_tool(WhiteboardController.Tool.LINE)
_check(
controller.get_selected_segment() == null,