Fixed loading layer visibility setting for printouts
This commit is contained in:
parent
90b6156448
commit
3d15092643
|
@ -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 ) );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue