We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.
Possible fix for KICAD-KY.
Note that this only works where a BOARD_COMMIT or SCHEMATIC_COMMIT is used.
(BOARD_COMMIT is used almost universally in PCBNew, but SCHEMATIC_COMMIT
has very little adoption in EEschema so far.)
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files. This updates the
permissions to match the existing values where possible
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
While unfortunate (we generally frown on having fixed sizes in
favour of having everything auto-layout), in this case it's a
cost of lazy-loading the panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14785
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.
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
The paged book initialization (and others) can generate events,
re-laying out the whole dialog multiple times during initialization.
This halts events during the layout period
Fixes https://gitlab.com/kicad/code/kicad/issues/13158
The crash was caused by an unhandled exception. The uncaught exception
caused a cacophony of null configuration setting pointers so guards were
added to prevent crashes should other exceptions occur that do not get
handled correctly.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13046
dropping files to Kicad manager :
*.kicad_pro, *.pro -> open project;
gerber and job files -> open in Gerbview editor;
Eagle and Cadstar files -> open project.
dropping file to schematic editor -> append schematic;
dropping library file to Symbol editor -> add library;
dropping board file to PCB editor -> append board;
dropping library or footprint file to Footprint editor -> add library or import footprint;
dropping ZIP file or gerber files to Gerbview editor -> open files;
dropping sheet file to Drawing Sheet editor -> open sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11638
Processing a menu event for quitting results in the frame being
destroyed. This crashes the program when it tries to access the newly
freed frame to check for autosave data. We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss
Fixes https://gitlab.com/kicad/code/kicad/issues/8638
For some reason this does not affect the KiCad frame manager window so it
is an exception to prevent it from becoming an ever growing window height
issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8889