Commit 4e210a2d authored by jean-pierre charras's avatar jean-pierre charras
Browse files

ModEdit: fix a refresh issue after deleting a pad (depending on the position...

ModEdit: fix a  refresh issue after deleting a pad (depending on the position of the pad, the pad was sometimes not immediately undrawn).
Fix a few coverity wanings (not initialized members in ctors)
parent 709697ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -496,7 +496,7 @@ void EDA_3D_CANVAS::DisplayStatus()
    msg.Printf( wxT( "dy %3.2f" ), m_draw3dOffset.y );
    msg.Printf( wxT( "dy %3.2f" ), m_draw3dOffset.y );
    Parent()->SetStatusText( msg, 2 );
    Parent()->SetStatusText( msg, 2 );


    msg.Printf( wxT( "View: %3.1f" ), 45 * GetPrm3DVisu().m_Zoom );
    msg.Printf( _( "Zoom: %3.1f" ), 45 * GetPrm3DVisu().m_Zoom );
    Parent()->SetStatusText( msg, 3 );
    Parent()->SetStatusText( msg, 3 );
}
}


+4 −4
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * This program source code file is part of KiCad, a free EDA CAD application.
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 *
 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
 * Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors.
 * Copyright (C) 2015 KiCad Developers, see change_log.txt for contributors.
 *
 *
 * This program is free software; you can redistribute it and/or
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * modify it under the terms of the GNU General Public License
@@ -148,17 +148,17 @@ void SCH_BASE_FRAME::UpdateStatusBar()
    {
    {
    case INCHES:
    case INCHES:
        absformatter = wxT( "X %.3f  Y %.3f" );
        absformatter = wxT( "X %.3f  Y %.3f" );
        locformatter = wxT( "dx %.3f  dy %.3f  d %.3f" );
        locformatter = wxT( "dx %.3f  dy %.3f  dist %.3f" );
        break;
        break;


    case MILLIMETRES:
    case MILLIMETRES:
        absformatter = wxT( "X %.2f  Y %.2f" );
        absformatter = wxT( "X %.2f  Y %.2f" );
        locformatter = wxT( "dx %.2f  dy %.2f  d %.2f" );
        locformatter = wxT( "dx %.2f  dy %.2f  dist %.2f" );
        break;
        break;


    case UNSCALED_UNITS:
    case UNSCALED_UNITS:
        absformatter = wxT( "X %f  Y %f" );
        absformatter = wxT( "X %f  Y %f" );
        locformatter = wxT( "dx %f  dy %f  d %f" );
        locformatter = wxT( "dx %f  dy %f  dist %f" );
        break;
        break;


    case DEGREES:
    case DEGREES:
+1 −1
Original line number Original line Diff line number Diff line
@@ -186,7 +186,7 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()


    m_mainToolBar->AddSeparator();
    m_mainToolBar->AddSeparator();
    m_mainToolBar->AddTool( ID_LIBEDIT_VIEW_DOC, wxEmptyString, KiBitmap( datasheet_xpm ),
    m_mainToolBar->AddTool( ID_LIBEDIT_VIEW_DOC, wxEmptyString, KiBitmap( datasheet_xpm ),
                            _( "Edit document file" ) );
                            _( "Show the associated datasheet or document" ) );


    m_mainToolBar->AddSeparator();
    m_mainToolBar->AddSeparator();
    m_partSelectBox = new wxComboBox( m_mainToolBar,
    m_partSelectBox = new wxComboBox( m_mainToolBar,
+7 −3
Original line number Original line Diff line number Diff line
@@ -213,14 +213,18 @@ void PCB_BASE_FRAME::DeletePad( D_PAD* aPad, bool aQuery )
            return;
            return;
    }
    }


    // Stores the initial bounding box to refresh the old area
    EDA_RECT bbox = module->GetBoundingBox();

    m_Pcb->m_Status_Pcb = 0;
    m_Pcb->m_Status_Pcb = 0;
    aPad->DeleteStructure();
    aPad->DeleteStructure();
    // Refresh the modified screen area, using the initial bounding box
    // which is perhaps larger than the new bounding box
    m_canvas->RefreshDrawingRect( module->GetBoundingBox() );
    // Update the bounding box
    // Update the bounding box
    module->CalculateBoundingBox();
    module->CalculateBoundingBox();


    // Refresh the modified screen area, using the initial bounding box
    // which is perhaps larger than the new bounding box
    m_canvas->RefreshDrawingRect( bbox );

    OnModify();
    OnModify();
}
}


+12 −0
Original line number Original line Diff line number Diff line
@@ -349,6 +349,18 @@ PNS_ROUTER::PNS_ROUTER()
    m_board = NULL;
    m_board = NULL;
    m_dragger = NULL;
    m_dragger = NULL;
    m_mode = PNS_MODE_ROUTE_SINGLE;
    m_mode = PNS_MODE_ROUTE_SINGLE;

    // Initialize all other variables:
    m_lastNode = NULL;
    m_shove = NULL;
    m_iterLimit = 0;
    m_showInterSteps = false;
    m_snapshotIter = 0;
    m_view = NULL;
    m_currentEndItem = NULL;
    m_snappingEnabled  = false;
    m_violation = false;

}
}




Loading