From 85ca85652d8d74b998c1e5cda631598794cafe4b Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 29 May 2021 12:40:00 -0400 Subject: [PATCH] Do not add debug items to view if debug flag isn't enabled Fixes https://gitlab.com/kicad/code/kicad/-/issues/8510 --- pcbnew/router/pns_kicad_iface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 9d6eea33ff..85ba0708c3 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -1669,7 +1669,9 @@ void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView ) m_debugDecorator = dec; dec->SetDebugEnabled( ADVANCED_CFG::GetCfg().m_ShowRouterDebugGraphics ); - dec->SetView( m_view ); + + if( ADVANCED_CFG::GetCfg().m_ShowRouterDebugGraphics ) + dec->SetView( m_view ); }