There seem to be some cases where the AUI perspectives are getting saved
with false visibility. This means they aren't getting shown when
settings are restored. We don't support hiding toolbars, so just always
force them to be shown because otherwise there is no other way to get
them back.
SearchDynamicEventTable does a linear scan through all dynamic
Bind entries for every dispatched event, regardless of event type.
Replace the per-action Bind() calls with a single wxID_ANY handler
that dispatches to the existing m_uiUpdateMap through a hash map.
This reduces the per-event scan from around 150 to about 1 for all
event types. This is particularly noticeable during high frequency
events like mouse drag.
FreeBSD uses libspnav, just like a Linux does, so all the
conditional code addressing the spnav APIs should be used
on FreeBSD, too.
Unfortunately, the logic was not consistent in all places:
sometimes we had "#ifdef", sometimes "#if defined" and
sometimes it was negated as "#ifndef". To make the intention
clearer across both Linux and FreeBSD, I unified all places
to a "#if defined(__linux__) || defined(__FreeBSD__)".
If we get another OS latching onto the same logic, we should
introduce a simple flag for this, but for only two OSes I
decided against adding central logic for this.
Even in wx 3.3, we load string AUI perspectives on settings migration
(e.g., from a wx 3.2 version to wx 3.3, like the 9->10 transition). In
that case, we also need to ensure the toolbars are shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23075
Break the most expensive header include chains that contaminate the
largest number of translation units
New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
Guard against re-entrant wxEVT_CLOSE_WINDOW events in windowClosing().
GTK can deliver a second close event while the first is still being
processed (e.g. during Destroy() calls in doCloseWindow), leading to
use-after-free crashes when the tool manager has already been deleted.
Also add defensive null checks for GetToolManager() and GetTool() in
all SaveSettings/SaveProjectLocalSettings paths that access the
selection tool filter, since these are called during frame teardown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22926
This creates a new panel under Footprint Editor preferences that
contains the user layer count dropdown and the named layers grid.
The user layer count setting now controls how many unnamed user layers
appear in the footprint editor. Setting it to zero hides all unnamed
user layers unless they are used by the loaded footprint or have been
given a custom name.
wx3.2 hides all panes and then only shows the ones that it finds in the
restore string. This is problematic for us because it will hide things
we don't want hidden.
Iterate through the pane array and reset everything to visible so that
we can position them
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22781
The previous code used a private var. Replaced by a equivalent code using
public methods in a for() loop.
I don't know why MSVC accepted the previous code.
Allows activating a display panel that shows a webpage designed to
provide instances of symbols, footprints, 3d models and spice models to
the designer.
The webpage can be installed via PCM or directly in the panel. Webpages
should be registered with the KiCad project in order to avoid a warning
when showing content.
Uses lockfile to prevent overlapping commits
Ensure restore happens recursively
Remove files added after restore point
Prevent duplicate savers from overrunning each other
Local history combines project backup and autosave into a single place
where arbitrary history can be stored efficiently and restored to any
point in time. Git commits are made on a debouce timer to hold
modifications, allowing the user to step backwards in time to arbitrary
points. Restoring backups does not remove the existing files and
choosing to restore an autosave point does not remove the state of the
files prior to the restore, providing additional safety.
Keeps the maximum storage size limit but removes the additional
limitations of number of backups/backups per day, etc as these are not
relevant to a CoW-based backup as unchanged files do not take up
additional space.
LoadPerspective allows a easy way to store/load frame geometry.
Unfortunately it easy create broken geometry frame (missing or misplaced toolbars
for instance) when the number or the type of items has changed between last saved
geometry and the geometry frame in use when loading old Perspective. And the only
one way to fix a broken geometry is to delete the config json files.
So the saved Perspective is loaded only if EnableUseAuiPerspective advanced option
is set to 1, mainly for developers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21828
Using the new wx3.3 routines to serialize the state of our AUI elements,
we store them using JSON in the preferences for each window
I have left the SavePerspective in place for now to see how legacy
(mostly *nix) builds handle this and provide a smooth transition to 3.3
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2381
The scope, recursion, reset options and message filters remain in the
user preferences. Others including numbering, sort order and reuse are
schematic preferences.
Also, the oddball subunit display remains here but it doesn't really
belong in annotation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17942
This format is more extendable in the future, should separator and
spacer support be added to groups.
Also, this now has a working UI for modifying the toolbars.
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
the various tool types
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names