A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.
There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.
Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
That even was removed by upstream wxWidgets in
81570ae070
which is included in all versions after 3.1.1, so our 3.2 versions
definitely aren't doing anything when we pass this event. The actual
identifier has also been guarded behind a 3.0 compatibility define in wx
as of 3.3.
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.
The actual problem is that EVENTS::SelectedItemsModified (via EDA_DRAW_FRAME::UpdateMsgPanel) is being called on every OnModify call, where it really should only be called if the *selected* items are modified. This problem will take longer to fix.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13279
Some of these are due to moving to wxWidgets 3.2, but I'm not sure
all of them are. In particular, the need for CallAfter() in the
search pane's selection handler is probably just a wxWidgets bug on
Mac (the control lies about the current selection inside the event
handler).
Also sets better column widths in the search pane.
Also includes fixes for instance data and resolving of textvar
references.
Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.
Fixes https://gitlab.com/kicad/code/kicad/issues/12357