Store line width setting for printouts

This commit is contained in:
Maciej Suminski 2018-10-06 23:40:55 +02:00
parent b727b310b4
commit 90b6156448
3 changed files with 3 additions and 6 deletions

View File

@ -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 );

View File

@ -41,7 +41,6 @@
#include <dialog_print_generic.h>
#include <pcbnew_printout.h>
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;
}

View File

@ -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" )