More delay for netname drawing, and don't run through tracks if it's off.

This commit is contained in:
Jeff Young 2022-09-16 22:19:56 +01:00
parent 2aa8facacd
commit f10fdfc7d7
1 changed files with 6 additions and 1 deletions

View File

@ -357,7 +357,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
if( GetCanvas()->GetView()->GetViewport() != m_lastViewport ) if( GetCanvas()->GetView()->GetViewport() != m_lastViewport )
{ {
m_lastViewport = GetCanvas()->GetView()->GetViewport(); m_lastViewport = GetCanvas()->GetView()->GetViewport();
m_redrawNetnamesTimer.StartOnce( 200 ); m_redrawNetnamesTimer.StartOnce( 500 );
} }
// Do not forget to pass the Idle event to other clients: // 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 ) void PCB_EDIT_FRAME::redrawNetnames( wxTimerEvent& aEvent )
{ {
PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( Kiface().KifaceSettings() );
if( !cfg || cfg->m_Display.m_NetNames < 2 )
return;
KIGFX::VIEW* view = GetCanvas()->GetView(); KIGFX::VIEW* view = GetCanvas()->GetView();
for( PCB_TRACK* track : GetBoard()->Tracks() ) for( PCB_TRACK* track : GetBoard()->Tracks() )