Browse Source

Fixed loading layer visibility setting for printouts

pull/13/head
Maciej Suminski 7 years ago
parent
commit
3d15092643
  1. 4
      common/board_printout.cpp
  2. 14
      gerbview/dialogs/dialog_print_gerbview.cpp
  3. 3
      pcbnew/dialogs/dialog_print_pcbnew.cpp

4
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 ) );

14
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;
}

3
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

Loading…
Cancel
Save