Commit 94dccc91 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew! fix Bug #1184030

very minor other chnages.
parent da51dbe1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -530,13 +530,14 @@ wxString SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet()

    wxString filename = fn.GetName();
    wxString sheetFullName =  m_CurrentSheet->PathHumanReadable();
    sheetFullName.Trim( true );
    sheetFullName.Trim( false );

    // Remove the last '/' of the path human readable
    // (and for the root sheet, make sheetFullName empty):
    sheetFullName.RemoveLast();

    sheetFullName.Trim( true );
    sheetFullName.Trim( false );

    // Convert path human readable separator to '-'
    sheetFullName.Replace( wxT( "/" ), wxT( "-" ) );

+1 −1
Original line number Diff line number Diff line
@@ -1090,7 +1090,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
    wxPoint shapeoffset = aPad->GetOffset();

    if( (sz.GetWidth() > 0) || (sz.GetHeight() > 0) ||
        (shapeoffset.x > 0) || (shapeoffset.y > 0) )
        (shapeoffset.x != 0) || (shapeoffset.y != 0) )
    {
        m_out->Print( 0, " (drill" );

+7 −2
Original line number Diff line number Diff line
@@ -370,9 +370,9 @@ NETLIST_READER* NETLIST_READER::GetNetlistReader( NETLIST* aNetlist,
}


void CMP_READER::Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR )
bool CMP_READER::Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR )
{
    wxCHECK_RET( aNetlist != NULL, wxT( "No netlist passed to CMP_READER::Load()" ) );
    wxCHECK_MSG( aNetlist != NULL,true, wxT( "No netlist passed to CMP_READER::Load()" ) );

    wxString reference;    // Stores value read from line like Reference = BUS1;
    wxString timestamp;    // Stores value read from line like TimeStamp = /32307DE2/AA450F67;
@@ -380,6 +380,7 @@ void CMP_READER::Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR )
    wxString buffer;
    wxString value;

    bool ok = true;

    while( m_lineReader->ReadLine() )
    {
@@ -434,5 +435,9 @@ void CMP_READER::Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR )
        // This is an usual case during the life of a design
        if( component )
            component->SetFootprintName( footprint );
        else
            ok = false;     // can be used to display a warning in Pcbnew.
    }

    return ok;
}
+5 −1
Original line number Diff line number Diff line
@@ -417,8 +417,12 @@ public:
     *
     * @throw IO_ERROR if a the #LINE_READER IO error occurs.
     * @throw PARSE_ERROR if an error occurs while parsing the file.
     * @return true if OK, false if a component reference found in the
     * .cmp file is not found in netlist, which means the .cmp file
     * is not updated. This is an usual case, in CvPcb, but can be used to
     * print a warning in Pcbnew.
     */
    void Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR );
    bool Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR );
};