mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-29 14:14:15 +02:00
795484ff4f
Rectangles, ellipses, lines and polygons were left out of the Align submenu: with only shapes selected every command was greyed out, and a shape outside a group was ignored when aligning it with a symbol. Shapes now take part like pictures. Their edges are the shape as drawn (the new QetShapeItem::sceneOutlineRect(), without the pen, the 6 px selection margin or the wider hover outline; the old code used sceneBoundingRect() for grouped shapes and so aligned them 6 px off). The point that goes on the grid is the top-left corner of that box: a rectangle's corner, an ellipse's box. pos() is not used, because a shape drawn with Ctrl held or rotated has its corners off the grid while pos() is on it. The menu's enable rule now counts what the command counts, a group as one. Before, two symbols in one group enabled the six align commands, which then did nothing and only said so in the status bar. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>