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
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.
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.