Commit 2df818b8 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix issue in GPcb footprints import.

Better code in test connections in zones.
Very minor other fixes
parent 85d2f2f1
Loading
Loading
Loading
Loading
+965 −945

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, int aSaveType, bool aCreat
            if( schematicFileName.FileExists() )
            {
                backupFileName.SetExt( g_SchematicBackupFileExtension );
                if( backupFileName.FileExists() )
                    wxRemoveFile( backupFileName.GetFullPath() );

                if( !wxRenameFile( schematicFileName.GetFullPath(), backupFileName.GetFullPath() ) )
+8 −6
Original line number Diff line number Diff line
@@ -408,20 +408,22 @@ wxString SCH_FIND_COLLECTOR::GetText()
    SCH_FIND_COLLECTOR_DATA data = m_data[ m_foundIndex ];
    EDA_ITEM* foundItem = m_List[ m_foundIndex ];

    wxCHECK_MSG( foundItem != NULL, wxEmptyString, wxT( "Inavalid found item pointer." ) );
    wxCHECK_MSG( foundItem != NULL, wxEmptyString, wxT( "Invalid found item pointer." ) );

    wxString msg;

    if( data.GetParent() )
    {
        msg = _( "Child item " ) + foundItem->GetSelectMenuText() +
              _( " of parent item " ) + data.GetParent()->GetSelectMenuText() +
              _( " found in sheet " ) + data.GetSheetPath();
        msg.Printf( _( "Child item %s of parent item %s found in sheet %s" ),
                    GetChars( foundItem->GetSelectMenuText() ),
                    GetChars( data.GetParent()->GetSelectMenuText() ),
                    GetChars( data.GetSheetPath() ) );
    }
    else
    {
        msg = _( "Item " ) + foundItem->GetSelectMenuText() + _( " found in sheet " ) +
              data.GetSheetPath();
        msg.Printf( _( "Item %s found in sheet %s" ),
                    GetChars( foundItem->GetSelectMenuText() ),
                    GetChars( data.GetSheetPath() ) );
    }

    return msg;
+0 −4
Original line number Diff line number Diff line
@@ -856,8 +856,6 @@ void PCB_BASE_FRAME::TestConnections()

    m_Pcb->Test_Connections_To_Copper_Areas();

// int st = clock(); // For test only, will be removed

    // Test existing connections net by net
    // note some nets can have no tracks, and pads intersecting
    // so Build_CurrNet_SubNets_Connections must be called for each net
@@ -889,8 +887,6 @@ void PCB_BASE_FRAME::TestConnections()
    for( int net = last_net_tested+1; net < netsCount; net++ )
        connections.Build_CurrNet_SubNets_Connections( NULL, NULL, net );

// wxLogMessage("time %g ms", (double)(clock() - st)*1000.0/CLOCKS_PER_SEC);

    Merge_SubNets_Connected_By_CopperAreas( m_Pcb );

    return;
+3 −3
Original line number Diff line number Diff line
@@ -299,10 +299,10 @@ this file again." ) );
        }
    }
    catch( IO_ERROR ioe )
    {
    {wxMessageBox("catch");
        wxString msg = wxString::Format(  _( "Error loading board.\n%s" ),
                            ioe.errorText.GetData() );
        wxMessageBox( msg, _( "Open Board File" ), wxICON_ERROR | wxOK );
        wxMessageBox( msg, _( "Open Board File" ), wxOK | wxICON_ERROR );
    }

    if( !aAppend )
@@ -490,7 +490,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
    {
        wxString msg = wxString::Format(  _( "Error saving board.\n%s" ),
                            ioe.errorText.GetData() );
        wxMessageBox( msg, _( "Save Board File" ), wxICON_ERROR );
        wxMessageBox( msg, _( "Save Board File" ), wxICON_ERROR | wxOK );
        saveok = false;
    }

Loading