Remove PCBNEW_SETTINGS dependence from PCB_PLOT_PARAMS
This commit is contained in:
parent
39d4e422ea
commit
2cbae18598
|
@ -310,6 +310,11 @@ bool DIALOG_EXPORT_SVG::CreateSVGFile( const wxString& aFullFileName )
|
|||
m_board->SetAuxOrigin( origin );
|
||||
}
|
||||
|
||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||
PCBNEW_SETTINGS* cfg = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
||||
|
||||
plot_opts.SetColorSettings( mgr.GetColorSettings( cfg->m_ColorTheme ) );
|
||||
|
||||
LOCALE_IO toggle;
|
||||
|
||||
SVG_PLOTTER* plotter = (SVG_PLOTTER*) StartPlotBoard( m_board, &plot_opts, UNDEFINED_LAYER,
|
||||
|
|
|
@ -738,6 +738,11 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
|
|||
|
||||
applyPlotSettings();
|
||||
|
||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||
PCBNEW_SETTINGS* cfg = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
||||
|
||||
m_plotOpts.SetColorSettings( mgr.GetColorSettings( cfg->m_ColorTheme ) );
|
||||
|
||||
m_plotOpts.SetSketchPadLineWidth( board->GetDesignSettings().GetLineThickness( F_Fab ) );
|
||||
|
||||
// If no layer selected, we have nothing plotted.
|
||||
|
|
|
@ -28,11 +28,8 @@
|
|||
#include <math/util.h> // for KiROUND
|
||||
#include <pcb_plot_params.h>
|
||||
#include <pcb_plot_params_parser.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <pgm_base.h>
|
||||
#include <plotter.h>
|
||||
#include <settings/color_settings.h>
|
||||
#include <settings/settings_manager.h>
|
||||
|
||||
|
||||
#define PLOT_LINEWIDTH_MIN ( 0.02 * IU_PER_MM ) // min value for default line thickness
|
||||
|
@ -149,19 +146,8 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
|
|||
|
||||
m_sketchPadLineWidth = Millimeter2iu( 0.1 ); // line width to plot items in outline mode
|
||||
|
||||
if( PgmOrNull() )
|
||||
{
|
||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||
auto app = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
||||
|
||||
m_colors = mgr.GetColorSettings( app->m_ColorTheme );
|
||||
m_default_colors = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_default_colors = std::make_shared<COLOR_SETTINGS>();
|
||||
m_colors = m_default_colors.get();
|
||||
}
|
||||
m_default_colors = std::make_shared<COLOR_SETTINGS>();
|
||||
m_colors = m_default_colors.get();
|
||||
}
|
||||
|
||||
void PCB_PLOT_PARAMS::SetGerberPrecision( int aPrecision )
|
||||
|
|
Loading…
Reference in New Issue