From 4521091cc165c9120c1bb20b2407e479b1862be4 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 8 Apr 2021 17:35:51 -0400 Subject: [PATCH] Do not invalidate geometry when all we need is a repaint Fixes https://gitlab.com/kicad/code/kicad/-/issues/8157 --- pcbnew/tools/pcb_control.cpp | 6 +++--- pcbnew/tools/pcb_viewer_tools.cpp | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 392ae67ecd..20692c806e 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -126,7 +126,7 @@ int PCB_CONTROL::TrackDisplayMode( const TOOL_EVENT& aEvent ) for( auto track : board()->Tracks() ) { if( track->Type() == PCB_TRACE_T || track->Type() == PCB_ARC_T ) - view()->Update( track, KIGFX::GEOMETRY ); + view()->Update( track, KIGFX::REPAINT ); } canvas()->Refresh(); @@ -171,7 +171,7 @@ int PCB_CONTROL::ViaDisplayMode( const TOOL_EVENT& aEvent ) for( auto track : board()->Tracks() ) { if( track->Type() == PCB_TRACE_T || track->Type() == PCB_VIA_T ) - view()->Update( track, KIGFX::GEOMETRY ); + view()->Update( track, KIGFX::REPAINT ); } canvas()->Refresh(); @@ -210,7 +210,7 @@ int PCB_CONTROL::ZoneDisplayMode( const TOOL_EVENT& aEvent ) m_frame->SetDisplayOptions( opts ); for( ZONE* zone : board()->Zones() ) - view()->Update( zone, KIGFX::GEOMETRY ); + view()->Update( zone, KIGFX::REPAINT ); canvas()->Refresh(); diff --git a/pcbnew/tools/pcb_viewer_tools.cpp b/pcbnew/tools/pcb_viewer_tools.cpp index a8c99baa90..a284b0b58e 100644 --- a/pcbnew/tools/pcb_viewer_tools.cpp +++ b/pcbnew/tools/pcb_viewer_tools.cpp @@ -101,7 +101,7 @@ int PCB_VIEWER_TOOLS::ShowPadNumbers( const TOOL_EVENT& aEvent ) for( FOOTPRINT* fp : board()->Footprints() ) { for( PAD* pad : fp->Pads() ) - view()->Update( pad, KIGFX::GEOMETRY ); + view()->Update( pad, KIGFX::REPAINT ); } canvas()->Refresh(); @@ -120,7 +120,7 @@ int PCB_VIEWER_TOOLS::PadDisplayMode( const TOOL_EVENT& aEvent ) for( FOOTPRINT* fp : board()->Footprints() ) { for( PAD* pad : fp->Pads() ) - view()->Update( pad, KIGFX::GEOMETRY ); + view()->Update( pad, KIGFX::REPAINT ); } canvas()->Refresh(); @@ -141,7 +141,7 @@ int PCB_VIEWER_TOOLS::GraphicOutlines( const TOOL_EVENT& aEvent ) for( BOARD_ITEM* item : fp->GraphicalItems() ) { 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(); 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(); @@ -168,13 +168,13 @@ int PCB_VIEWER_TOOLS::TextOutlines( const TOOL_EVENT& aEvent ) for( FOOTPRINT* fp : board()->Footprints() ) { - view()->Update( &fp->Reference(), KIGFX::GEOMETRY ); - view()->Update( &fp->Value(), KIGFX::GEOMETRY ); + view()->Update( &fp->Reference(), KIGFX::REPAINT ); + view()->Update( &fp->Value(), KIGFX::REPAINT ); for( BOARD_ITEM* item : fp->GraphicalItems() ) { 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(); if( t == PCB_TEXT_T || BaseType( t ) == PCB_DIMENSION_T ) - view()->Update( item, KIGFX::GEOMETRY ); + view()->Update( item, KIGFX::REPAINT ); } canvas()->Refresh();