Without the project files, certain settings will not be saved by this
python call. This defaults to false (current behavior) but setting the
`aSkipSettings` to true will revert to v5 behavior
Fixes https://gitlab.com/kicad/code/kicad/issues/11323
(cherry picked from commit 8418fe12d8)
By default, we load all footprints with a new UUID set to allow them to
be added to the board as unique objects. But when editing footprints,
we want to maintain the same UUID.
Fixes https://gitlab.com/kicad/code/kicad/issues/11870
(cherry picked from commit 802745398a)
s_SettingsManager is not always initialized when the WriteDRCReport is
run. We should first attempt to extract the project from the actual
board being checked. Failing that, we fall back to the static settings manager and then exit if we don't have a project associated.
Fixes https://gitlab.com/kicad/code/kicad/issues/10221
(i.e. from board editor and from fp editor)
Once is enough.
Once plugins are loaded, calling LoadPlugins() from fpeditor disable plugins
in board editor
Fixes#9846https://gitlab.com/kicad/code/kicad/issues/9846
For some reason, escaped double quotes in wxString::Format cause issues
on Mac. We can replace them with single quotes in most places without
loss of clarity
1. It's impossible to use methods that modify parameters in swig so
I extend it in wrapper
2. Simplify GetArcAngle() and fix the bug where it lies about 360
degree arc to be 0 degrees.
Unused variables in function calls can be commented out. Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
Python code like:
for track in board.GetTracks():
board.Remove(track)
Would delete tracks in the the underlying m_tracks while iterating over
it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5192
KiCad cannot have more than one board/project open, so disallow
the Python APIs for loading additional boards when the frame is
present. Inherit the SETTINGS_MANAGER from the frame when present
instead of creating a new one that won't have the loaded project.
Currently there is pcbnew.ExportSpecctraDSN() but it needs a pcbnew
frame set which makes it unusable outside of the scripting window or a
plugin.
This refactors actual exporting logic into separate helper and adds an
overload to ExportSpecctraDSN(board, filename) that doesn't need pcbnew
window.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.