Edit microvia: fix incorrect drill size (Bug #1466653)
Fix a few coverity minor warnings.
This commit is contained in:
parent
e211a77d8b
commit
355bd47e16
|
@ -73,6 +73,12 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||||
{
|
{
|
||||||
const VIA *via = static_cast<const VIA *>( aTrackItem );
|
const VIA *via = static_cast<const VIA *>( aTrackItem );
|
||||||
|
|
||||||
|
// Micro vias have a size only defined in their netclass
|
||||||
|
// (no specific values defined by a table of specific value)
|
||||||
|
// Ensure the netcall is accessible:
|
||||||
|
if( via->GetViaType() == VIA_MICROVIA && net == NULL )
|
||||||
|
net = aTrackItem->GetNet();
|
||||||
|
|
||||||
// Get the draill value, regardless it is default or specific
|
// Get the draill value, regardless it is default or specific
|
||||||
initial_drill = via->GetDrillValue();
|
initial_drill = via->GetDrillValue();
|
||||||
|
|
||||||
|
@ -96,14 +102,16 @@ bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||||
new_drill = net->GetMicroViaDrillSize();
|
new_drill = net->GetMicroViaDrillSize();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
new_width = GetDesignSettings().GetCurrentMicroViaSize();
|
{
|
||||||
|
// Should not occur
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Old versions set a drill value <= 0, when the default netclass it used
|
// Old versions set a drill value <= 0, when the default netclass it used
|
||||||
// but it could be better to set the drill value to the actual value
|
// but it could be better to set the drill value to the actual value
|
||||||
// to avoid issues for existing vias, if the default drill value is modified
|
// to avoid issues for existing vias, if the default drill value is modified
|
||||||
// in the netclass, and not in current vias.
|
// in the netclass, and not in current vias.
|
||||||
if( via->GetDrill() <= 0 ) // means default netclass drill value used
|
if( via->GetDrill() <= 0 ) // means default netclass drill value used
|
||||||
{
|
{
|
||||||
initial_drill = -1; // Force drill vias re-initialization
|
initial_drill = -1; // Force drill vias re-initialization
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,7 @@ public:
|
||||||
m_parent( aParent ),
|
m_parent( aParent ),
|
||||||
m_plotOpts( aParent->GetPlotSettings() )
|
m_plotOpts( aParent->GetPlotSettings() )
|
||||||
{
|
{
|
||||||
|
m_reporter = &m_messagesPanel->Reporter();
|
||||||
initDialog();
|
initDialog();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints(this);
|
GetSizer()->SetSizeHints(this);
|
||||||
|
|
|
@ -219,12 +219,13 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( const BOARD* aBoard )
|
||||||
UseColorScheme( aBoard->GetColorsSettings() );
|
UseColorScheme( aBoard->GetColorsSettings() );
|
||||||
|
|
||||||
PCB_BASE_FRAME* frame = dynamic_cast<PCB_BASE_FRAME*>( GetParent() );
|
PCB_BASE_FRAME* frame = dynamic_cast<PCB_BASE_FRAME*>( GetParent() );
|
||||||
SetTopLayer( frame->GetActiveLayer() );
|
|
||||||
|
|
||||||
if( frame )
|
if( frame )
|
||||||
{
|
{
|
||||||
|
SetTopLayer( frame->GetActiveLayer() );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) frame->GetDisplayOptions();
|
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) frame->GetDisplayOptions();
|
||||||
static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( displ_opts );
|
static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
||||||
|
m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( displ_opts );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_view->RecacheAllItems( true );
|
m_view->RecacheAllItems( true );
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
PNS_MEANDER_PLACER_BASE::PNS_MEANDER_PLACER_BASE( PNS_ROUTER* aRouter ) :
|
PNS_MEANDER_PLACER_BASE::PNS_MEANDER_PLACER_BASE( PNS_ROUTER* aRouter ) :
|
||||||
PNS_PLACEMENT_ALGO( aRouter )
|
PNS_PLACEMENT_ALGO( aRouter )
|
||||||
{
|
{
|
||||||
|
m_currentWidth = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue