diff --git a/common/printout.cpp b/common/printout.cpp index a9dbfcec98..eb60155be6 100644 --- a/common/printout.cpp +++ b/common/printout.cpp @@ -22,6 +22,7 @@ void PRINTOUT_SETTINGS::Save( wxConfigBase* aConfig ) { + aConfig->Write( OPTKEY_PRINT_LINE_WIDTH, m_lineWidth ); aConfig->Write( OPTKEY_PRINT_SCALE, m_scale ); aConfig->Write( OPTKEY_PRINT_PAGE_FRAME, m_titleBlock ); aConfig->Write( OPTKEY_PRINT_MONOCHROME_MODE, m_blackWhite ); @@ -30,6 +31,7 @@ void PRINTOUT_SETTINGS::Save( wxConfigBase* aConfig ) void PRINTOUT_SETTINGS::Load( wxConfigBase* aConfig ) { + aConfig->Read( OPTKEY_PRINT_LINE_WIDTH, &m_lineWidth, 10000 ); aConfig->Read( OPTKEY_PRINT_SCALE, &m_scale, 1.0 ); aConfig->Read( OPTKEY_PRINT_PAGE_FRAME, &m_titleBlock, false ); aConfig->Read( OPTKEY_PRINT_MONOCHROME_MODE, &m_blackWhite, 1 ); diff --git a/pcbnew/dialogs/dialog_print_pcbnew.cpp b/pcbnew/dialogs/dialog_print_pcbnew.cpp index d903df7d5f..f1433b037d 100644 --- a/pcbnew/dialogs/dialog_print_pcbnew.cpp +++ b/pcbnew/dialogs/dialog_print_pcbnew.cpp @@ -41,7 +41,6 @@ #include #include -extern int g_DrawDefaultLineThickness; class DIALOG_PRINT_PCBNEW : public DIALOG_PRINT_GENERIC { @@ -156,10 +155,6 @@ bool DIALOG_PRINT_PCBNEW::TransferDataToWindow() // Print all layers one one page or separately m_boxPagination->SetSelection( settings()->m_pagination ); - // Default line width - settings()->m_lineWidth = g_DrawDefaultLineThickness; - m_lineWidth.SetValue( settings()->m_lineWidth ); - // Update the dialog layout when layers are added GetSizer()->Fit( this ); @@ -338,7 +333,6 @@ void DIALOG_PRINT_PCBNEW::saveSettings() settings()->m_mirror = m_checkboxMirror->GetValue(); DIALOG_PRINT_GENERIC::saveSettings(); - g_DrawDefaultLineThickness = settings()->m_lineWidth; } diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h index 08f1d5e5c7..a98ad9602d 100644 --- a/pcbnew/pcbplot.h +++ b/pcbnew/pcbplot.h @@ -51,6 +51,7 @@ class REPORTER; /// \ingroup config #define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" ) +#define OPTKEY_PRINT_LINE_WIDTH wxT( "PrintLineWidth" ) #define OPTKEY_PRINT_SCALE wxT( "PrintScale" ) #define OPTKEY_PRINT_PAGE_FRAME wxT( "PrintPageFrame" ) #define OPTKEY_PRINT_MONOCHROME_MODE wxT( "PrintMonochrome" )