Commit 67d98658 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

minor cleanup. minor enhancements. Finish file housekeeping. add Bug 682586...

minor cleanup. minor enhancements. Finish file housekeeping. add Bug 682586 fix from Mark van Doesburg.
parent 8e0937e6
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -741,13 +741,13 @@ void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig )
    wxArrayString* libname_list = m_Pt_param;
    wxArrayString* libname_list = m_Pt_param;


    unsigned       indexlib = 0;
    unsigned       indexlib = 0;
    wxString       cle_config;
    wxString       configkey;
    for( ; indexlib < libname_list->GetCount(); indexlib++ )
    for( ; indexlib < libname_list->GetCount(); indexlib++ )
    {
    {
        cle_config = m_Ident;
        configkey = m_Ident;


        // We use indexlib+1 because first lib name is LibName1
        // We use indexlib+1 because first lib name is LibName1
        cle_config << (indexlib + 1);
        configkey << (indexlib + 1);
        aConfig->Write( cle_config, libname_list->Item( indexlib ) );
        aConfig->Write( configkey, libname_list->Item( indexlib ) );
    }
    }
}
}
+1 −3
Original line number Original line Diff line number Diff line
@@ -140,7 +140,7 @@ found in the default search paths." ),


    BOOST_FOREACH( COMPONENT& component, m_components )
    BOOST_FOREACH( COMPONENT& component, m_components )
    {
    {
        m_ListCmp->SetSelection( ii, true );
        m_ListCmp->SetSelection( ii++, true );


        if( !component.m_Module.IsEmpty() )
        if( !component.m_Module.IsEmpty() )
            continue;
            continue;
@@ -169,7 +169,5 @@ any of the project footprint libraries." ),
                              this );
                              this );
            }
            }
        }
        }

        ii += 1;
    }
    }
}
}
+0 −4
Original line number Original line Diff line number Diff line
@@ -355,8 +355,6 @@ void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )


        ii++;
        ii++;
    }
    }

    wxBell();
    m_ListCmp->SetSelection( selection );
    m_ListCmp->SetSelection( selection );
}
}


@@ -384,8 +382,6 @@ void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
        }
        }
        ii--;
        ii--;
    }
    }

    wxBell();
    m_ListCmp->SetSelection( selection );
    m_ListCmp->SetSelection( selection );
}
}


+5 −5
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* a
{
{
    wxASSERT( aParent != NULL );
    wxASSERT( aParent != NULL );


    m_checkReference->SetValue( aParent->GetShowSheetReference() );
    m_checkReference->SetValue( aParent->GetPrintSheetReference() );
    m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() );
    m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() );
}
}


@@ -138,7 +138,7 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
    }
    }


    parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
    parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
    parent->SetShowSheetReference( m_checkReference->IsChecked() );
    parent->SetPrintSheetReference( m_checkReference->IsChecked() );


    EndDialog( wxID_CANCEL );
    EndDialog( wxID_CANCEL );
}
}
@@ -165,7 +165,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
    WinEDA_SchematicFrame* parent = GetParent();
    WinEDA_SchematicFrame* parent = GetParent();


    parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
    parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
    parent->SetShowSheetReference( m_checkReference->IsChecked() );
    parent->SetPrintSheetReference( m_checkReference->IsChecked() );


    // Pass two printout objects: for preview, and possible printing.
    // Pass two printout objects: for preview, and possible printing.
    wxString        title   = _( "Preview" );
    wxString        title   = _( "Preview" );
@@ -194,7 +194,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
    WinEDA_SchematicFrame* parent = GetParent();
    WinEDA_SchematicFrame* parent = GetParent();


    parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
    parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
    parent->SetShowSheetReference( m_checkReference->IsChecked() );
    parent->SetPrintSheetReference( m_checkReference->IsChecked() );


    wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() );
    wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() );
    printDialogData.SetMaxPage( g_RootSheet->CountSheets() );
    printDialogData.SetMaxPage( g_RootSheet->CountSheets() );
@@ -333,7 +333,7 @@ void SCH_PRINTOUT::DrawPage()
    panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
    panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
    panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );
    panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );


    bool printReference = parent->GetShowSheetReference();
    bool printReference = parent->GetPrintSheetReference();


    if( printReference )
    if( printReference )
    {
    {
+4 −4
Original line number Original line Diff line number Diff line
@@ -342,10 +342,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void )
                                                      &g_DefaultTextLabelSize,
                                                      &g_DefaultTextLabelSize,
                                                      DEFAULT_SIZE_TEXT, 0,
                                                      DEFAULT_SIZE_TEXT, 0,
                                                      1000 ) );
                                                      1000 ) );
    m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "PrintMonochrome" ),
                                                       &m_printMonochrome, true ) );
    m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "ShowSheetReferenceAndTitleBlock" ),
                                                       &m_showSheetReference, true ) );


    return m_projectFileParams;
    return m_projectFileParams;
}
}
@@ -542,6 +538,10 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
    m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
    m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
                                                        &g_LayerDescr.LayerColor[LAYER_ERC_ERR],
                                                        &g_LayerDescr.LayerColor[LAYER_ERC_ERR],
                                                        RED ) );
                                                        RED ) );
    m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintMonochrome" ),
                                                        &m_printMonochrome, true ) );
    m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintSheetReferenceAndTitleBlock" ),
                                                        &m_printSheetReference, true ) );


    return m_configSettings;
    return m_configSettings;
}
}
Loading