diff --git a/common/board_printout.cpp b/common/board_printout.cpp index 8e679fa0ae..5fcc3c10fe 100644 --- a/common/board_printout.cpp +++ b/common/board_printout.cpp @@ -44,7 +44,7 @@ void BOARD_PRINTOUT_SETTINGS::Load( wxConfigBase* aConfig ) { PRINTOUT_SETTINGS::Load( aConfig ); - for( unsigned layer = 0; layer < m_layerSet.count(); ++layer ) + for( unsigned layer = 0; layer < m_layerSet.size(); ++layer ) { int tmp; wxString key = wxString::Format( OPTKEY_LAYERBASE, layer ); @@ -58,7 +58,7 @@ void BOARD_PRINTOUT_SETTINGS::Save( wxConfigBase* aConfig ) { PRINTOUT_SETTINGS::Save( aConfig ); - for( unsigned layer = 0; layer < m_layerSet.count(); ++layer ) + for( unsigned layer = 0; layer < m_layerSet.size(); ++layer ) { wxString key = wxString::Format( OPTKEY_LAYERBASE, layer ); aConfig->Write( key, m_layerSet.test( layer ) ); diff --git a/gerbview/dialogs/dialog_print_gerbview.cpp b/gerbview/dialogs/dialog_print_gerbview.cpp index e0c05321de..385127224f 100644 --- a/gerbview/dialogs/dialog_print_gerbview.cpp +++ b/gerbview/dialogs/dialog_print_gerbview.cpp @@ -116,9 +116,8 @@ private: DIALOG_PRINT_GERBVIEW::DIALOG_PRINT_GERBVIEW( GERBVIEW_FRAME* aParent, BOARD_PRINTOUT_SETTINGS* aSettings ) : - DIALOG_PRINT_GENERIC( aParent, aSettings ) + DIALOG_PRINT_GENERIC( aParent, aSettings ), m_parent( aParent ) { - m_parent = aParent; m_config = Kiface().KifaceSettings(); // Line width settings range @@ -135,9 +134,6 @@ bool DIALOG_PRINT_GERBVIEW::TransferDataToWindow() if( !DIALOG_PRINT_GENERIC::TransferDataToWindow() ) return false; - if( m_config ) - settings()->Load( m_config ); - GERBER_FILE_IMAGE_LIST* images = m_parent->GetGerberLayout()->GetImagesList(); int itemIdx = 0; @@ -159,9 +155,15 @@ bool DIALOG_PRINT_GERBVIEW::TransferDataToWindow() continue; wxFileName filename( gbrImage->m_FileName ); - m_layerLists[listIdx]->Append( filename.GetFullName() ); + wxCheckListBox* listBox = m_layerLists[listIdx]; + listBox->Append( filename.GetFullName() ); + + if( settings()->m_layerSet.test(ii) ) + listBox->Check( ii, true ); + wxASSERT( m_layerToItemMap.count( ii ) == 0 ); m_layerToItemMap[ii] = itemIdx; + ++itemIdx; } diff --git a/pcbnew/dialogs/dialog_print_pcbnew.cpp b/pcbnew/dialogs/dialog_print_pcbnew.cpp index f1433b037d..cb56e57ed3 100644 --- a/pcbnew/dialogs/dialog_print_pcbnew.cpp +++ b/pcbnew/dialogs/dialog_print_pcbnew.cpp @@ -120,9 +120,6 @@ bool DIALOG_PRINT_PCBNEW::TransferDataToWindow() if( !DIALOG_PRINT_GENERIC::TransferDataToWindow() ) return false; - if( m_config ) - settings()->Load( m_config ); - BOARD* board = m_parent->GetBoard(); // Create layer list