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.
Also cleans up the dialog a bit.
Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9036
The default is usually wrong and presenting the basic footprint
information when creating an empty footprint allows the user to
establish their preference before mistakes occur.
Fixes https://gitlab.com/kicad/code/kicad/issues/9215
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal). Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.