Move with Reference - Rotate 90deg does not use reference for polygon or rectangle

Description

In footprint editor and PCB editor, moving or copying a rectangle or polygon "with reference" doesn't use the reference when rotating 90° clockwise or counterclockwise. Mirroring works fine. Rotating with reference works correctly for arcs and segments. Rotating with reference also works correctly if multiple items are selected, even if any of those items are rectangles or polygons.

Steps to reproduce

  1. Download this project bug_report_project.zip
  2. Open Footprint Editor, bug_report_footprint_library > bug_report_footprint
  3. Try moving around the items with reference. If you select just a rectangle or a polygon, moving/copying with reference followed by roating will not use the center reference, whereas selecting multiple items, or the arc/segment item will use the center reference

KiCad Version

Application: KiCad Footprint Editor x64 on x64

Version: 9.0.4, release build

Libraries:
	wxWidgets 3.2.8
	FreeType 2.13.3
	HarfBuzz 10.2.0
	FontConfig 2.15.0

Platform: Windows 11 (build 26100), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: Intel, Intel(R) Arc(TM) Graphics, 4.6.0 - Build 32.0.101.6881

	wxWidgets: 3.2.8 (wchar_t,wx containers)
	Boost: 1.88.0
	OCC: 7.9.1
	Curl: 8.13.0-DEV
	ngspice: 44
	Compiler: Visual C++ 1942 without C++ ABI
	KICAD_IPC_API=ON

Locale: 
	Lang: en_GB
	Enc: UTF-8
	Num: 1,234.5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)