mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-10 06:04:12 +02:00
be8e2372a9
Pressing Escape while a handle of a picture was dragged went to DiagramView, which clears the selection. That removed the handles under the mouse, so the drag stopped where it was: the picture kept the new size, angle or pivot, and since the release never arrived, no undo step was recorded and the change could not be undone. Diagram gets a keyboardItem: an item in a state Escape must end. While a resize, rotate, skew or pivot handle is dragged, the picture is that item; DiagramView sends each key to it first, and only keys it does not take reach the view's own shortcuts. Escape puts the picture back as it was when the handle was pressed (position, transform, and whether the pivot was placed by hand) and ignores the rest of the gesture, so no undo step is recorded. The drag also ends when the handles go away. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>