Previously, the GAL_DISPLAY_OPTIONS object in FOOTPRINT_PREVIEW_PANEL::New
was passed by reference in the ctor, down to EDA_DRAW_PANEL_GAL, which stored
it as a reference. The object in New() then goes out of scope, so the
referencing panel outlives the options.
Fix this by making a copy in a std::unique_ptr of the options, and giving
ownership to the panel.
There is another issue here: when the Pcbnew options are copies, the
OBSERVABLE subscriber list is copied too. This means if the panel called
NotifyChanged() on the options, Pcbnew would get updates, even though a copy
of the options changed. However, the panel doesn't change the options or
notify, so it's OK for now.
(cherry picked from commit 17e88d0944)
In some linux configurations, the canvas refresh must be posted before
being handled. Simply requesting the refresh can queue the event,
preventing an up to date GL canvas from being saved.
Fixes: lp:1819536
* https://bugs.launchpad.net/kicad/+bug/1819536
(cherry picked from commit 707e7b4b65)
Save and restore text thickness in SCH_TEXT::Plot() function to prevent
the plotting default thickness value from stepping on the original text
thickness and causing all of the text objects to magically change to bold.
Fixes lp:1823165
https://bugs.launchpad.net/kicad/+bug/1823165
(cherry picked from commit 3d33cba574)
On some platforms like MSVC, NaN prints as "-nan(ind)". This
is a bit needlessly ugly, so print "NaN" on all platforms
consistently.
This fixes a test failure on MSVC.
(cherry picked from commit dd17f24c04)
This allows a failing test to report which case failed more clearly.
Add a quick helper to make an "in -> out" context string.
(cherry picked from commit 3f32dc9a64)
Use the icon scaling logic and call a toolbar rebuild when the
common settings change (echos the handling in Pcbnew and friends).
Remove an unused function.
(cherry picked from commit 8548e69382)
The 3D viewer also uses OpenGL, so it also needs to
adjust based on DPI scale factors.
This patch moves the 3D viewer common config code solely
within the 3D viewer, and adds handling of the DPI scale. This
also avoids duplicated logic in PCB_BASE_FRAME::CommonSettingsChanged.
For now, as EDA_3D_VIEWER is not included in the Kiway settings
dispatch, still manually invoke the settings update from
PCB_BASE_FRAME.
The PANEL_3D_PREV gets a similar function to read the config, but
it doesn't have a listener for the update, so it's set just once
at dialog init, just like the existing pan settings.
Fixes: lp:1823681
* https://bugs.launchpad.net/kicad/+bug/1823681
(cherry picked from commit 124dd5e59a)
This behavior existed in 5.0.x but did not properly exit the edit tool
in 5.1. This removes stops the edit tool when we begin dragging a track
using the interactive router.
Fixes: lp:1820312
* https://bugs.launchpad.net/kicad/+bug/1820312
(cherry picked from commit c8118e3ce4)
Adjust the sizer proportions slightly to eliminate the reported bug.
This may not be the ideal way to do this and there could be some issues
on other platforms but it does resolve the issue on gtk3.
Fixes lp:1820084
https://bugs.launchpad.net/kicad/+bug/1820084
(cherry picked from commit 615c49315f)
Apparently at some point in KiCad's development, a '~' character was
prefixed to the symbol name to indicate that it was not visible. The
visibility state is now saved in the name field so remove the prefix.
The parser was kept unchanged.
Fixes lp:1632048
https://bugs.launchpad.net/kicad/+bug/1632048
(cherry picked from commit ee14da3093)
When removing a point from the polygon, the vertex is removed before it
is tested for validity. If it fails validation, the edit is reverted
and the point count doesn't change, so the view update only modifies the
existing points. But the revert may also have changed the shared
pointer to the point array, invalidating the view's copy.
Fixes: lp:1821909
* https://bugs.launchpad.net/kicad/+bug/1821909
(cherry picked from commit 940aef77af)
Both Cairo and OpenGL had issues (different, though) with circles that are
thicker in line width than they have radius. This corrects the OpenGL
implementation (radius is calculated to the outer edge) as well as Cairo
(line width needs to be clamped to twice the radius)
Fixes: lp:1822765
* https://bugs.launchpad.net/kicad/+bug/1822765
(cherry picked from commit db0523626c)
There is a circular dependency between the GRAPHICS_IMPORTER object and
the GRAPHICS_IMPORT_PLUGIN object which makes sharing the settings in
the GRAPHICS_IMPORTER unwieldy. This fix is a ugly hack that resolves
the issue. The underlying issue will require some major refactoring.
Fixes lp:1821234
https://bugs.launchpad.net/kicad/+bug/1821234
(cherry picked from commit 120ab06db4)
Improve padding, spacing and alignment of dialog layout.
Fix title capitalization.
Make file dialog wildcard string translatable.
Remove fixed initial dialog size to allow sizers to work their magic.
Replace OK button event handler with TransferDataFromWindow.
Remember last line width units between dialog instances and sessions.
Save configuration file settings in a separate group and remove GfxImport
prefix from the entry names.
Add fencing to dialog header file to prevent nested includes.
Fixes lp:1822568
https://bugs.launchpad.net/kicad/+bug/1822568
(cherry picked from commit d2cb0ca75f)
Also provide a utility function to get this path, and
a way to override at run time to quickly sub in alternative
data.
The test itself is still broken, as this plugin won't accept
a call to Load() without a KiWay.
(cherry picked from commit 88faac309f)
Redesignate the eagle test as eeschema tests and build
more like the other unit tests.
Enable as a test in Ctest now that the test executes without
crashing.
The loading of the file with the hardocded part is still
not enabled, as this needs more infrastructure to support it.
(cherry picked from commit 4eb30f6b85)
Statically constructing wxCursors as used for the probe
and tune cursors crashes the qa_eagle_plugin test
instantly.
Fix this by introducing a new class CURSOR_STORE,
which allows to abstract the platform wierdness of wxCursors
and allow the simulator to laziliy init its own cursors
at runtime.
This code isn't properly tested, as these cursors are never
actually used. However, it does allow the eeschema unit test
to run.
Fixes: lp:1781191
* https://bugs.launchpad.net/kicad/+bug/1781191
(cherry picked from commit 6f1c3f5ef8)
This inserts a translation map in the layer names so that the old stable
files with Italian/French layer names get updated to the standard
English layer names (instead of not opening).
Fixes: lp:1370575
* https://bugs.launchpad.net/kicad/+bug/1370575
(cherry picked from commit 6f4d1345f3)
This is only for the current GerbView session. When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.
(cherry picked from commit f20a1314ff)