eeschema 6.99: wrong alignment buttons processing in edit field dialog

Description

See screencast.

Screencast_2022-01-05_14_45_32

Steps to reproduce

  1. Open schematic editor, place attached symbol r0603.kicad_sym, double-click any field
  2. Notice, that noone vertical alignment icon is highlighted.
  3. Select top alignment, close dialog.
  4. Reopen dialog again. Notice, that center vertical alignment icon selected.
  5. Click on center vertical alignment icon, notice it gets unselected and noone other icon gets selected.
  6. Select center vertical alignment icon, close dialog.
  7. Reopen dialog, notice that down alignment icon is selected.

Update: horizontal alignment buttons broken as well:

  1. Open schematic editor, place attached symbol.
  2. Double-click on symbol itself to open symbol properties dialog
  3. Notice Right alignment of reference field and left alignment of value fields, close dialog
  4. Open field edit dialog on reference field, notice no horizontal alignment icon selected, close dialog
  5. Open field edit dialog on value field, notice center horizontal alignment icon selected, close dialog

KiCad Version

Application: KiCad Schematic Editor

Version: (6.99.0-259-geeef65533a), release build

Libraries:
	wxWidgets 3.0.4

Platform: Linux 5.11.0-43-generic x86_64, 64 bit, Little endian, wxGTK, cinnamon, x11

	wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.68.0
	ngspice: 31
	Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
Edited by Sergey A. Borshch