eeschema: Rotate copied symbol - anchor point is wrong (regression)
Description
If a copied symbol is pasted and in this state moved and rotated, the rotation-center-point is wrong. The rotation-center-point depends on the position where the symbol is pasted into the schematic.
This is possibly introduced with the solution for #8520 (closed). For testing purposes I installed an 3 weeks old version (5.99.0-12829-gf2783a86, release build, Date: Oct 16 2021 00:00:19) which was correctly working.
By the way as a user-feedback/personal opinion:
- I personally dislike the change of the rotation-behavior which was introduced with #8520 (closed) (rotating around the pin under cursor instead around the center of symbol).
- Before this enhancement every rotation was very predictive, the rotation occured always around the symbol-center/anchor-point
- now the rotation depends on the exact cursor-position in relation to all the pins, it requires much more attention. The added flexibility (with the cursor-position I can choose the rotation-point) yields mostly more effort (on exact cursor-positioning) and only seldom saves work where this extra flexibility is really useful
Steps to reproduce
- open some kicad-project, open schematic
- place some generic resistor symbol, select it, copy (CTRL-C) the resistor
- ESC to deselect the resistor, move cursor 0.7" down
- CTRL-Y to paste the previously copied resistor-symbol into the schematic. Symbil is inserted at the current cursor-location (all good). Movement of the symbol is possible (and also good), but for now don't move symbol.
- "R" to rotate symbol 90° to the right (anti-clockwise). Rotation works in principle, but observe the anchor-point of the rotation.
- "R" to rotate symbol again (180° anti-clockwise). observe rotation-center-point.
- "R" to rotate symbol again (270° anti-clockwise). observe rotation-center-point.
- if this demonstration is not enough: repeat from step 3 onwards, with the cursor moved much more away from the original symbol. This results in a rotation where the rotated symbol could get out of view of the current schematic-window.
KiCad Version
Application: KiCad Schematic Editor (64-bit)
Version: (5.99.0-13002-gc47e5ce577), release build
Libraries:
wxWidgets 3.1.5
Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.78.0-DEV
ngspice: 35
Compiler: Visual C++ 1929 without C++ ABI
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Edited by Maik Freitag
