Hide PNS debug graphics behind an AC key
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4061
This commit is contained in:
parent
a9e97848dd
commit
3d7610d6b9
|
@ -80,6 +80,11 @@ static const wxChar RealtimeConnectivity[] = wxT( "RealtimeConnectivity" );
|
|||
*/
|
||||
static const wxChar CoroutineStackSize[] = wxT( "CoroutineStackSize" );
|
||||
|
||||
/**
|
||||
* Show PNS router debug graphics while routing
|
||||
*/
|
||||
static const wxChar ShowRouterDebugGraphics[] = wxT( "ShowRouterDebugGraphics" );
|
||||
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
|
@ -157,9 +162,10 @@ ADVANCED_CFG::ADVANCED_CFG()
|
|||
|
||||
// Init defaults - this is done in case the config doesn't exist,
|
||||
// then the values will remain as set here.
|
||||
m_EnableUsePadProperty = false;
|
||||
m_realTimeConnectivity = true;
|
||||
m_coroutineStackSize = AC_STACK::default_stack;
|
||||
m_EnableUsePadProperty = false;
|
||||
m_realTimeConnectivity = true;
|
||||
m_coroutineStackSize = AC_STACK::default_stack;
|
||||
m_ShowRouterDebugGraphics = false;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
@ -203,6 +209,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
&m_coroutineStackSize, AC_STACK::default_stack,
|
||||
AC_STACK::min_stack, AC_STACK::max_stack ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowRouterDebugGraphics,
|
||||
&m_ShowRouterDebugGraphics, false ) );
|
||||
|
||||
wxConfigLoadSetups( &aCfg, configParams );
|
||||
|
||||
for( auto param : configParams )
|
||||
|
|
|
@ -83,6 +83,11 @@ public:
|
|||
*/
|
||||
int m_coroutineStackSize;
|
||||
|
||||
/**
|
||||
* Show PNS router debug graphics
|
||||
*/
|
||||
bool m_ShowRouterDebugGraphics;
|
||||
|
||||
|
||||
private:
|
||||
ADVANCED_CFG();
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include <advanced_config.h>
|
||||
|
||||
#include "tools/pcb_tool_base.h"
|
||||
|
||||
#include "pns_kicad_iface.h"
|
||||
|
@ -498,6 +500,9 @@ public:
|
|||
|
||||
void AddLine( const SHAPE_LINE_CHAIN& aLine, int aType, int aWidth, const std::string aName = "" ) override
|
||||
{
|
||||
if( !m_view )
|
||||
return;
|
||||
|
||||
ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( NULL, m_view );
|
||||
|
||||
pitem->Line( aLine, aWidth, aType );
|
||||
|
@ -1237,9 +1242,10 @@ void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView )
|
|||
delete m_debugDecorator;
|
||||
|
||||
auto dec = new PNS_PCBNEW_DEBUG_DECORATOR();
|
||||
dec->SetView( m_view );
|
||||
|
||||
m_debugDecorator = dec;
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_ShowRouterDebugGraphics )
|
||||
dec->SetView( m_view );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue