From 7fb767653c7948cf8bdee789c5f9a171aa0db8eb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 11 Oct 2020 17:06:28 +0100 Subject: [PATCH] Performance enhancements. Don't redraw all pads when active layer is set unless it has really changed. --- pcbnew/pcb_edit_frame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index a73aeb7bae..0785304daa 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -971,6 +971,9 @@ void PCB_EDIT_FRAME::SetGridColor( COLOR4D aColor ) void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer ) { + if( GetActiveLayer() == aLayer ) + return; + PCB_BASE_FRAME::SetActiveLayer( aLayer ); m_appearancePanel->OnLayerChanged();