Rework plotting colors to ensure color settings are always available

This commit is contained in:
Jon Evans
2020-03-29 21:43:18 -04:00
parent 570ea62b64
commit 34aee50ae1
4 changed files with 16 additions and 21 deletions
+10 -2
View File
@@ -138,8 +138,16 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
// it is a "local" parameter
m_skipNPTH_Pads = false;
// TODO(JE) Is it an issue for this to be tied to Pgm()?
m_colors = PgmOrNull() ? Pgm().GetSettingsManager().GetColorSettings() : nullptr;
if( PgmOrNull() )
{
m_default_colors = nullptr;
m_colors = Pgm().GetSettingsManager().GetColorSettings();
}
else
{
m_default_colors = std::make_shared<COLOR_SETTINGS>();
m_colors = m_default_colors.get();
}
}
void PCB_PLOT_PARAMS::SetGerberPrecision( int aPrecision )