Our coroutine system can make debugging memory issues harder by not
following a standard stack allocation system. We can get around this by
using valgrind's built-in stack instrumentation. Each coroutine
registers a stack allocation allowing memcheck to recognize when
accesses are bounded.
Also rewrites the PCBNew Find dialog to make use of the above, including:
1) searching in user-defined footprint fields
2) searching in pcb text
3) a history list in the search popup
4) case sensitive searching
5) word sensitive searching
6) the ability to turn wildcard searching on/off
7) better placement of the result when the dialog obscures part of the
window
Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
Pads not on copper layers now do not have a netname, and are no longer taken in account in connectivity.
Especially it avoid creating useless rats-nests for these pads.
Previously, for instance after modifying preferences or language,
they were rebuilt but the tools state was not set due to a missing call to SyncToolbars() after rebuilding.
These are used in too many places throughout pcbnew to change all
polygons. If we need different rounding, we'll want to implement them
on a per-call basis.
1) Intermediate states might be self-intersecting, and we shouldn't
be policing our users on what order to do things in
2) The polygon might already be self-intersecting, at which point we're
preventing the user from fixing it.
Also includes better const management for SHAPE_POLY_SET API.
Fixes: lp:1833831
* https://bugs.launchpad.net/kicad/+bug/1833831
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.
Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop. (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)
The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
In .gbrjob file, one can specify the thickness and color of some layers.
Currently, there is no way to enter these parameters.
This commit prepare a better support of .gbrjob files.
Oblong holes (slots) use now a aperture attribute similar to round holes.
(The previous attribute "slot" is now deprecated)
However they have a specific aperture, and a comment is added in drill files for these apertures.
In singletop mode, all frames show the "Quit" option in the file menu
and will quit on Ctrl-Q. When launched from the main KiCad interface,
sub-programs show the "Close" option instead and will close with Ctrl-W.
In this mode, Ctrl-Q will instruct the main program to exit.
Fixes: lp:1779938
* https://bugs.launchpad.net/kicad/+bug/1779938
Footprint library nicknames are case sensitive but the comparison for
the library tree control was case insensitive.
Also make the footprint name comparisons case sensitive as well. While
not strictly necessary, the plan is to start using the name defined in
the footprint file instead of the file name which will allow for case
sensitivity.
Fixes lp:1833701
https://bugs.launchpad.net/kicad/+bug/1833701
(cherry picked from commit d8fff5c820)
A few files snuck in with CRLF for the line endings. These make it hard
to look at diffs as every line appears to have changed. This commit
makes only line ending changes, so can be ignored
Use the wxTextValidator style flag to allow the user to clear the library
identifier string. Use wxTextValidator::SetStyle( wxFILTER_EMPTY ) to
prevent empty library identifier strings which is the current behavior.
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.
Lastly, regularizes the Unsaved Changes strings between the apps.
Especially, small round rect pads have a ugly shape because the number of segments is
small and the 90 deg arcs are not very well approximated.
The minimal seg count for 90 deg arcs is now 4 (16 segm/circle) for pads.
Fixes: lp:1833005
https://bugs.launchpad.net/kicad/+bug/1833005
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
DIALOG_EXIT was not being laid out correctly after setting the dialog
message. Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT. This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.
Remove DIALOG_EXIT_BASE as it is no longer required.
Fixes lp:1832899
https://bugs.launchpad.net/kicad/+bug/1832899
If a tool called something like clearSelection while processing a
MOUSE_CLICK, the SELECTION_TOOL will pass the clearSelection
COMMAND_EVENT because it handles it as a transition, not as an
event. Because m_passEvent is effectively global, the tool manager
would then interpret that as passing the MOUSE_CLICK and we'd end
up processing the click by multiple tools.
Delete the copy ctor and assignment operator to start with, but
even then the separate apps each have their own statically allocated
copy of the common actions. So we need to update all of them, which
also means having the kicad manager frame's set of actions on hand).
This changelist also adds a Clear Hotkey Assignment function since
the hotkeys set is now likely to be sparse with respect to the
actions.
* rename WS_DRAW_ITEM_POLYGON to WS_DRAW_ITEM_POLYPOLYGONS (better name)
* use SHAPE_POLY_SET instead of std::vector(<wxPoint> to manage the set of polygons.
It also remove duplicate code related to HitTest and bounding box.
* fix HitTest and WS_DRAW_ITEM_POLYGON highlight.
Make the Show method accept any stream, default is current behaviour (stderr).
Can be used, therefore, also for stdout or even stringsteam.
Print a suitable timescale depending on the time recorded, from ns to s.
The function to pop a dialog is not really part of PROF_COUNTER,
if wanted, it can be done by the called.
This removes WX as a dep for PROF_COUNTER and profile,
which now used std::chrono only.
Also remove the print-to-stderr-with-delta function, as it's
unused too, and the delta times can be collected directly now
as std::chrono::durations if needed.
SCOPED_TIMER is a QA-only simpler version of PROF_COUNTER.
Extend PROF_COUNTER to allow access to the std::chrono::duration
for more flexibility.
Wrap PROF_COUNTER in SCOPED_PROF_COUNTER for RAII duration
output (for the same effect as SCOPED_TIMER).
These options were used to support the legacy canvas when drawing on
MacOS and GTK3. With the move to 100% GAL, they are extraneous. This
moves all DC over to "COPY" as we only use this for printing support in
Eeschema at the moment, so there is a single draw command (no erasing)
for the canvas.
This mixes the de-emphasized layers into the background color rather
than merely a black color. This also keeps some of the original layer
color.
Fixes: lp:1831316
* https://bugs.launchpad.net/kicad/+bug/1831316
Fixes a few commit issues based on the std:: rework. Add an option to
delete tracks fully in pads and makes merge tracks smarter
Fixes: lp:1787190
* https://bugs.launchpad.net/kicad/+bug/1787190
Due to an interaction with old (<1.59) versions of Boost, the ostream
operator<< for wxPoint and wxSize is requried to use
BOOST_CHECK_EQUAL_COLLECTIONS (the print_log_value<T> function is not
used by this macro until 1.59).
Because these functions are available in Debug builds, unit tests that
use such functions will break when compiled as Release or
RelWithDebugInfo.
The change here is to not disable these functions in Release builds.
Also, the functions are moved to common.h, to go with other generic
WX "polyfill" functions. Although they might be commonly used by the
EDA_ITEM::Show functions, they are not specifically related to that
class.
Fixes: lp:1830612
* https://bugs.launchpad.net/kicad/+bug/1830612
Also fixes the post-duplicate move to start at the cursor pos.
Also fixes the fact that duplicate wasn't getting its hotkey.
Fixes: lp:1830596
* https://bugs.launchpad.net/kicad/+bug/1830596
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments. This allows the user to customize their speed vs. accuracy
tradeoff. The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
This corrects an issue with fill segments-per-circle and moves the error
to segmetns calculation down in a number of functions to expose the
single value for approximation
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.
This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline. KiCad zones are drawn inside the polygon. We need to both
increase the zone size and decrease the minimum pen width to account for
this.
Fixes: lp:1817312
* https://bugs.launchpad.net/kicad/+bug/1817312
This commit redirected too many menuitem IDs to the tool manager.
Only some context menu items have to be redirected, not all inside ACTION_EVENT events.
This hack is not perfect. It needs a better handling of ACTION_EVENT handling.
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
Remove the axis numbering code from ARRAY_OPTIONS
and place in a new class, ARRAY_AXIS. This keeps
the logic for the array item numbering separate from
the logic for the array item geometry.
This simplifies the logic in the ARRAY_OPTIONS class, which
no longer has to deal with the numbering of each axis.
Replace INCREMENTAL_TEXT_CTRL with wxSpinCtrlDouble because it looks
and works better.
Remove INCREMENTAL_TEXT_CTRL header and source files because the only
place they were used was in GAL_OPTIONS_PANEL.