Fix issues calling SaveBoard on board loaded from PcbNew frame

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.
This commit is contained in:
Jon Evans
2021-08-14 09:18:21 -04:00
parent bff247b08a
commit 8eba0b356b
2 changed files with 37 additions and 7 deletions
@@ -54,8 +54,13 @@ SETTINGS_MANAGER* GetSettingsManager();
*/
BOARD* CreateEmptyBoard();
// Boards can be saved only as .kicad_pcb file format,
// so no option to choose the file format.
/**
* Saves a copy of the given board and its associated project to the given path.
* Boards can only be saved in KiCad native format.
* @param aFileName is the full path to save a copy to.
* @param aBoard is a pointer to a loaded BOARD to save.
* @return true if the save was completed.
*/
bool SaveBoard( wxString& aFileName, BOARD* aBoard );
/**