In the failure case, the "makeType" is uninitialised. In a non-debug
build, wxFAIL will compile out and the uninitialised behaviour will
happen silently. In a debug build, it'll assert, and then do the
uninitialised behaviour anyway.
Continue explicity to avoid this.
Single pad nets deletion in dry run was incorrect when a new footprint was added, because in dry run it is not actually added,
and the single pad nets deletion does not see these new pads, and can (incorrectly) delete some nets.
This was always possible from modal browsers and from the footprint
editor, but it's now also possible from non-modal browsers and the
symbol editor.
Fixes: lp:920380
* https://bugs.launchpad.net/kicad/+bug/920380
Give the user the option of cancelling a file open if there are
segment zones; otherwise they're converted to polygon fills.
Fixes: lp:1823087
* https://bugs.launchpad.net/kicad/+bug/1823087
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.
This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.
Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.
Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
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.
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
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.
This is also a prelude to adding support for footprint testing
without a netlist.
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