Do not invalidate geometry when all we need is a repaint

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8157
This commit is contained in:
Jon Evans 2021-04-08 17:35:51 -04:00
parent d878cbddbc
commit 4521091cc1
2 changed files with 11 additions and 11 deletions

View File

@ -126,7 +126,7 @@ int PCB_CONTROL::TrackDisplayMode( const TOOL_EVENT& aEvent )
for( auto track : board()->Tracks() ) for( auto track : board()->Tracks() )
{ {
if( track->Type() == PCB_TRACE_T || track->Type() == PCB_ARC_T ) if( track->Type() == PCB_TRACE_T || track->Type() == PCB_ARC_T )
view()->Update( track, KIGFX::GEOMETRY ); view()->Update( track, KIGFX::REPAINT );
} }
canvas()->Refresh(); canvas()->Refresh();
@ -171,7 +171,7 @@ int PCB_CONTROL::ViaDisplayMode( const TOOL_EVENT& aEvent )
for( auto track : board()->Tracks() ) for( auto track : board()->Tracks() )
{ {
if( track->Type() == PCB_TRACE_T || track->Type() == PCB_VIA_T ) if( track->Type() == PCB_TRACE_T || track->Type() == PCB_VIA_T )
view()->Update( track, KIGFX::GEOMETRY ); view()->Update( track, KIGFX::REPAINT );
} }
canvas()->Refresh(); canvas()->Refresh();
@ -210,7 +210,7 @@ int PCB_CONTROL::ZoneDisplayMode( const TOOL_EVENT& aEvent )
m_frame->SetDisplayOptions( opts ); m_frame->SetDisplayOptions( opts );
for( ZONE* zone : board()->Zones() ) for( ZONE* zone : board()->Zones() )
view()->Update( zone, KIGFX::GEOMETRY ); view()->Update( zone, KIGFX::REPAINT );
canvas()->Refresh(); canvas()->Refresh();

View File

@ -101,7 +101,7 @@ int PCB_VIEWER_TOOLS::ShowPadNumbers( const TOOL_EVENT& aEvent )
for( FOOTPRINT* fp : board()->Footprints() ) for( FOOTPRINT* fp : board()->Footprints() )
{ {
for( PAD* pad : fp->Pads() ) for( PAD* pad : fp->Pads() )
view()->Update( pad, KIGFX::GEOMETRY ); view()->Update( pad, KIGFX::REPAINT );
} }
canvas()->Refresh(); canvas()->Refresh();
@ -120,7 +120,7 @@ int PCB_VIEWER_TOOLS::PadDisplayMode( const TOOL_EVENT& aEvent )
for( FOOTPRINT* fp : board()->Footprints() ) for( FOOTPRINT* fp : board()->Footprints() )
{ {
for( PAD* pad : fp->Pads() ) for( PAD* pad : fp->Pads() )
view()->Update( pad, KIGFX::GEOMETRY ); view()->Update( pad, KIGFX::REPAINT );
} }
canvas()->Refresh(); canvas()->Refresh();
@ -141,7 +141,7 @@ int PCB_VIEWER_TOOLS::GraphicOutlines( const TOOL_EVENT& aEvent )
for( BOARD_ITEM* item : fp->GraphicalItems() ) for( BOARD_ITEM* item : fp->GraphicalItems() )
{ {
if( item->Type() == PCB_FP_SHAPE_T ) if( item->Type() == PCB_FP_SHAPE_T )
view()->Update( item, KIGFX::GEOMETRY ); view()->Update( item, KIGFX::REPAINT );
} }
} }
@ -150,7 +150,7 @@ int PCB_VIEWER_TOOLS::GraphicOutlines( const TOOL_EVENT& aEvent )
KICAD_T t = item->Type(); KICAD_T t = item->Type();
if( t == PCB_SHAPE_T || BaseType( t ) == PCB_DIMENSION_T || t == PCB_TARGET_T ) if( t == PCB_SHAPE_T || BaseType( t ) == PCB_DIMENSION_T || t == PCB_TARGET_T )
view()->Update( item, KIGFX::GEOMETRY ); view()->Update( item, KIGFX::REPAINT );
} }
canvas()->Refresh(); canvas()->Refresh();
@ -168,13 +168,13 @@ int PCB_VIEWER_TOOLS::TextOutlines( const TOOL_EVENT& aEvent )
for( FOOTPRINT* fp : board()->Footprints() ) for( FOOTPRINT* fp : board()->Footprints() )
{ {
view()->Update( &fp->Reference(), KIGFX::GEOMETRY ); view()->Update( &fp->Reference(), KIGFX::REPAINT );
view()->Update( &fp->Value(), KIGFX::GEOMETRY ); view()->Update( &fp->Value(), KIGFX::REPAINT );
for( BOARD_ITEM* item : fp->GraphicalItems() ) for( BOARD_ITEM* item : fp->GraphicalItems() )
{ {
if( item->Type() == PCB_FP_TEXT_T ) if( item->Type() == PCB_FP_TEXT_T )
view()->Update( item, KIGFX::GEOMETRY ); view()->Update( item, KIGFX::REPAINT );
} }
} }
@ -183,7 +183,7 @@ int PCB_VIEWER_TOOLS::TextOutlines( const TOOL_EVENT& aEvent )
KICAD_T t = item->Type(); KICAD_T t = item->Type();
if( t == PCB_TEXT_T || BaseType( t ) == PCB_DIMENSION_T ) if( t == PCB_TEXT_T || BaseType( t ) == PCB_DIMENSION_T )
view()->Update( item, KIGFX::GEOMETRY ); view()->Update( item, KIGFX::REPAINT );
} }
canvas()->Refresh(); canvas()->Refresh();