Draw Center Dimensions Bug in PCB Editor

Description

In the PCB editor, you can draw Center Dimensions under 90 or 45 degree. The problem occurs when the center point of the 90 degree is off scren. The measure then disappears. The 45 degree stays normal.

Screenshot from 2025-09-03 16-17-23.png

Screenshot from 2025-09-03 16-17-39.png

Screenshot from 2025-09-03 16-18-06.png

Steps to reproduce

Open the PCB Editor and use Draw Center Dimensions.The issue happens regardless of the layer.

KiCad Version

Application: KiCad x86_64 on x86_64

Version: 9.0.4-9.0.4-0~ubuntu24.04.1, release build

Libraries:
	wxWidgets 3.2.4
	FreeType 2.13.2
	HarfBuzz 8.3.0
	FontConfig 2.15.0
	libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.7

Platform: Linux Mint 22.1, 64 bit, Little endian, wxGTK, X11, cinnamon, x11
OpenGL: AMD, AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.57, 6.8.0-79-generic), 4.6 (Compatibility Profile) Mesa 25.0.7-0ubuntu0.24.04.1

Build Info:
	Date: Aug 18 2025 02:17:55
	wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.83.0
	OCC: 7.6.3
	Curl: 8.5.0
	ngspice: 42
	Compiler: GCC 13.3.0 with C++ ABI 1018
	KICAD_IPC_API=ON

Locale: 
	Lang: en_US
	Enc: UTF-8
	Num: 1’234.5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
Application: KiCad PCB Editor x86_64 on x86_64

Version: 9.0.4-9.0.4-0~ubuntu24.04.1, release build

Libraries:
	wxWidgets 3.2.4
	FreeType 2.13.2
	HarfBuzz 8.3.0
	FontConfig 2.15.0

Platform: Linux Mint 22.1, 64 bit, Little endian, wxGTK, X11, cinnamon, x11
OpenGL: AMD, AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.57, 6.8.0-79-generic), 4.6 (Compatibility Profile) Mesa 25.0.7-0ubuntu0.24.04.1

	wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.83.0
	OCC: 7.6.3
	Curl: 8.5.0
	ngspice: 42
	Compiler: GCC 13.3.0 with C++ ABI 1018
	KICAD_IPC_API=ON

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