From f10fdfc7d75dc3529de3e2a8a57570dc3775e036 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 16 Sep 2022 22:19:56 +0100 Subject: [PATCH] More delay for netname drawing, and don't run through tracks if it's off. --- pcbnew/pcb_edit_frame.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index bfa1263a19..b890c2e3f8 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -357,7 +357,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : if( GetCanvas()->GetView()->GetViewport() != m_lastViewport ) { m_lastViewport = GetCanvas()->GetView()->GetViewport(); - m_redrawNetnamesTimer.StartOnce( 200 ); + m_redrawNetnamesTimer.StartOnce( 500 ); } // Do not forget to pass the Idle event to other clients: @@ -507,6 +507,11 @@ BOARD_ITEM_CONTAINER* PCB_EDIT_FRAME::GetModel() const void PCB_EDIT_FRAME::redrawNetnames( wxTimerEvent& aEvent ) { + PCBNEW_SETTINGS* cfg = dynamic_cast( Kiface().KifaceSettings() ); + + if( !cfg || cfg->m_Display.m_NetNames < 2 ) + return; + KIGFX::VIEW* view = GetCanvas()->GetView(); for( PCB_TRACK* track : GetBoard()->Tracks() )