From 89e7d8922318e26e95a462f4194f9e4f2a7f885c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 4 Oct 2016 10:25:35 +0200 Subject: [PATCH] Fix from master branch (lp:1630105 Gerbview print dialog does not display graphic layers list on some windows managers like Unity) --- gerbview/dialogs/dialog_print_using_printer.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gerbview/dialogs/dialog_print_using_printer.cpp b/gerbview/dialogs/dialog_print_using_printer.cpp index da89e7ac17..f408992b00 100644 --- a/gerbview/dialogs/dialog_print_using_printer.cpp +++ b/gerbview/dialogs/dialog_print_using_printer.cpp @@ -162,17 +162,16 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) { msg = _( "Layer" ); msg << wxT( " " ) << ii + 1; - m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg ); - if( g_GERBER_List.GetGbrImage( ii ) == NULL ) // Nothing loaded on this draw layer + wxStaticBoxSizer* boxSizer = ( ii < 16 ) ? m_leftLayersBoxSizer + : m_rightLayersBoxSizer; + + m_BoxSelectLayer[ii] = new wxCheckBox( boxSizer->GetStaticBox(), + wxID_ANY, msg ); + boxSizer->Add( m_BoxSelectLayer[ii], wxGROW | wxLEFT | wxRIGHT | wxTOP ); + + if( images->GetGbrImage( ii ) == NULL ) // Nothing loaded on this draw layer m_BoxSelectLayer[ii]->Enable( false ); - - if( ii < 16 ) - m_leftLayersBoxSizer->Add( m_BoxSelectLayer[ii], - wxGROW | wxLEFT | wxRIGHT | wxTOP ); - else - m_rightLayersBoxSizer->Add( m_BoxSelectLayer[ii], - wxGROW | wxLEFT | wxRIGHT | wxTOP ); } // Read the scale adjust option