From 624d88dff9893dca1ebb61f7ef2c7d00411e9ac5 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 24 Apr 2022 16:30:20 +0100 Subject: [PATCH] Disable background color when printing in black & white. Fixes https://gitlab.com/kicad/code/kicad/issues/11180 (cherry picked from commit 6738708a7fb8580d852855864528b573c17edeb4) --- eeschema/dialogs/dialog_print_using_printer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index a8e7fe19d4..5b965f0a2d 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -171,6 +171,12 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow() { 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_checkMonochrome->SetValue( cfg->m_Printing.monochrome ); m_checkBackgroundColor->SetValue( cfg->m_Printing.background ); @@ -246,7 +252,10 @@ void DIALOG_PRINT_USING_PRINTER::SavePrintOptions() cfg->m_Printing.monochrome = m_checkMonochrome->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(); COLOR_SETTINGS* theme = static_cast(