Set a default control so that the escape key closes the dialog.
Select the OK button after the user selects an annotation option. This
allows for keyboard navigation of the dialog and saves an extra mouse
move and click to when choosing an annotation setting.
Note: while we try to omit sizing info from FBP files, the list
controls assume way too wide a minimum width if they're not set.
Furthermore, sizing the dialog ends up leaving them a certain size
and clipping other elements is the dialog itself doesn't have limits
set. Sigh.
For historical reasons, they are stored in mils, but using int create rounding
issues when converting to/from mils to IU in dialogs.
This is a minor but annoying issue.
Fixes#16000https://gitlab.com/kicad/code/kicad/-/issues/16000
Also simplifies the dialog by removing the user grid (now that you
can add as many user grids as you want).
This does mean that you can no longer have an asymmetric grid, but
it gets too complex if we allow everything for everyone.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method. This will most assuredly crash if the dialog is shown
modally or quasi-modally.
Don't leak memory for mode-less dialogs created on the stack. Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up. Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.
Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.
Do not close mode-less dialogs in the parent frame's destructor. This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
Keeping a function reference is only in scope when the call is
immediately executed, not when it enters its own event loop.
This commit also excises one more onUpdateUI call as it is not needed
Fixes https://gitlab.com/kicad/code/kicad/issues/12395
This allows us to switch back to a standard modal dialog (instead of
quasi-modal, which has problems with Ctrl-V in a search box inside a
standard file dialog -- such as when picking a path).
Fixes https://gitlab.com/kicad/code/kicad/issues/9473
Converts dialog_image_editor to panel_image_editor. Embeds this panel in
a new properties dialog for the schematic and PCB editors that allows
editing position, layer, locked status, etc. like other items.