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

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
......@@ -496,7 +496,7 @@ void EDA_3D_CANVAS::DisplayStatus()
msg.Printf( wxT( "dy %3.2f" ), m_draw3dOffset.y );
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 );
}
......
......@@ -2,7 +2,7 @@
* 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 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
* modify it under the terms of the GNU General Public License
......@@ -148,17 +148,17 @@ void SCH_BASE_FRAME::UpdateStatusBar()
{
case INCHES:
absformatter = wxT( "X %.3f Y %.3f" );
locformatter = wxT( "dx %.3f dy %.3f d %.3f" );
locformatter = wxT( "dx %.3f dy %.3f dist %.3f" );
break;
case MILLIMETRES:
absformatter = wxT( "X %.2f Y %.2f" );
locformatter = wxT( "dx %.2f dy %.2f d %.2f" );
locformatter = wxT( "dx %.2f dy %.2f dist %.2f" );
break;
case UNSCALED_UNITS:
absformatter = wxT( "X %f Y %f" );
locformatter = wxT( "dx %f dy %f d %f" );
locformatter = wxT( "dx %f dy %f dist %f" );
break;
case DEGREES:
......
......@@ -186,7 +186,7 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_LIBEDIT_VIEW_DOC, wxEmptyString, KiBitmap( datasheet_xpm ),
_( "Edit document file" ) );
_( "Show the associated datasheet or document" ) );
m_mainToolBar->AddSeparator();
m_partSelectBox = new wxComboBox( m_mainToolBar,
......
......@@ -213,14 +213,18 @@ void PCB_BASE_FRAME::DeletePad( D_PAD* aPad, bool aQuery )
return;
}
// Stores the initial bounding box to refresh the old area
EDA_RECT bbox = module->GetBoundingBox();
m_Pcb->m_Status_Pcb = 0;
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
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();
}
......
......@@ -349,6 +349,18 @@ PNS_ROUTER::PNS_ROUTER()
m_board = NULL;
m_dragger = NULL;
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;
}
......
......@@ -80,6 +80,12 @@ PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld, PNS_ROUTER* aRouter ) :
{
m_forceClearance = -1;
m_root = aWorld;
// Initialize other temporary variables:
m_currentNode = NULL;
m_draggedVia = NULL;
m_iter = 0;
m_multiLineMode = false;
}
......
......@@ -43,6 +43,13 @@ ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aPa
m_clearance = -1;
m_originLayer = m_layer = ITEM_GAL_LAYER( GP_OVERLAY );
// initialize variables, overwritten by Update( aItem ), if aItem != NULL
m_router = NULL;
m_type = PR_SHAPE;
m_style = 0;
m_width = 0;
m_depth = 0;
if( aItem )
Update( aItem );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment