Disable background color when printing in black & white.

Fixes https://gitlab.com/kicad/code/kicad/issues/11180
This commit is contained in:
Jeff Young 2022-04-24 16:30:20 +01:00
parent 52eb210aa8
commit 6738708a7f
1 changed files with 10 additions and 1 deletions

View File

@ -166,6 +166,12 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
{ {
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig(); EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
if( cfg->m_Printing.monochrome )
{
m_checkBackgroundColor->SetValue( false );
m_checkBackgroundColor->Enable( false );
}
m_checkReference->SetValue( cfg->m_Printing.title_block ); m_checkReference->SetValue( cfg->m_Printing.title_block );
m_checkMonochrome->SetValue( cfg->m_Printing.monochrome ); m_checkMonochrome->SetValue( cfg->m_Printing.monochrome );
m_checkBackgroundColor->SetValue( cfg->m_Printing.background ); m_checkBackgroundColor->SetValue( cfg->m_Printing.background );
@ -241,7 +247,10 @@ void DIALOG_PRINT_USING_PRINTER::SavePrintOptions()
cfg->m_Printing.monochrome = m_checkMonochrome->IsChecked(); cfg->m_Printing.monochrome = m_checkMonochrome->IsChecked();
cfg->m_Printing.title_block = m_checkReference->IsChecked(); cfg->m_Printing.title_block = m_checkReference->IsChecked();
cfg->m_Printing.background = m_checkBackgroundColor->IsChecked();
if( m_checkBackgroundColor->IsEnabled() )
cfg->m_Printing.background = m_checkBackgroundColor->IsChecked();
cfg->m_Printing.use_theme = m_checkUseColorTheme->IsChecked(); cfg->m_Printing.use_theme = m_checkUseColorTheme->IsChecked();
COLOR_SETTINGS* theme = static_cast<COLOR_SETTINGS*>( COLOR_SETTINGS* theme = static_cast<COLOR_SETTINGS*>(