The symbol editor has few enough items that it will still be performant
if we always send a selected-item-modifed event. (As it turns out we
were doing that anyway as the check for child-modified flags didn't
also check for selected.)
mainly because we now use std::string in a lot of function using previously char*
FROM_UTF8(const char* cstring) now calls From_UTF8(const char* cstring)
The TOOL_ACTION_ARGS construction method is supposed to be fairly light
weight, so instead of creating/destroying strings all the time, pass
string_views to the actual string data instead.
wx doesn't currently support string_view -> wxString implicitly
currently, so we have to do the conversion ourself.
Also moves the settings from Board Setup to Preferences > PCB Editor.
Also collapses Track Drag Mode from radio buttons to a choice menu to
save space and allow it to be with the other editing action modes.
This is required to keep selected and brightened state across undo.
It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED. FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags. But that seems like a risky change....
Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
CHANGED abandon the unpredictable behaviour of the Simulation Command
dialog. You now separately add simulation tabs (which have invariant
command types once created), and the dialog edits the current tab.
Also a bunch of bug fixes to make multiple simulation plots actually
work.
- in DXF coordinates were using 6 digits for coordinate mantissa: this is not
enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord. This creates significant errors for start point
and end points of the arc. Now the center is given in double, and its position
is calculated from angle end points (and radius) to do not generate a position error
for these end points (previously the error could be 20 ... 50 nm)
Fixes#15056https://gitlab.com/kicad/code/kicad/-/issues/15056
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop. So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
The WX_COMPATIBILITY mode is always assumed now (the option was removed
previously), but the define is no longer present. So remove the old code
that checked for it and just leave the wxASSERT statements.
This is purely loading in the background based and has no artificial delay.
Will be more useful once kicad.exe ends up loading more on launch immediately ;)
Right now the splash is probably visible the longest launching pcbnew standalone.
The actual splash image can be considered a placeholder
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
This replaces a hack where the parameter was used to identify a custom
UI ID with a proper solution. This moves the cut/copy/paste actions to
the new system, but more like help/quit/close should also be moved over
in the future.
A function-chain constructor method allows for the long list of
parameters to the constructor to be shrunk to only the ones needed by
each action, and allow self-documenting code for what each part of a
TOOL_ACTION constructor does.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7617
Its members can be on copper layers, but the group itself isn't on any
layer.
Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes. (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)
Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15021
Normally this means surrounded by forward slashes, but we also still
allow any regular expression in a netclass match to keep from breaking
existing documents.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14944
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).
When creating a new file lock, we need to check if the containing
directory can be written, not if the file (which may not yet exist) can
be written
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14942
WindowIds aren't actually guaranteed to be unique, and we don't
perform a dynamic_cast on the result of FindWindowById() because
of linker issues....
This is an attempt to fix KICAD-39.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928