Re-entrancy guard for router tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/12604
(cherry picked from commit 413fd82813
)
This commit is contained in:
parent
e8d2c222b6
commit
bf95906f90
|
@ -171,7 +171,8 @@ static const TOOL_ACTION ACT_SwitchCornerMode( "pcbnew.InteractiveRouter.SwitchR
|
||||||
|
|
||||||
ROUTER_TOOL::ROUTER_TOOL() :
|
ROUTER_TOOL::ROUTER_TOOL() :
|
||||||
TOOL_BASE( "pcbnew.InteractiveRouter" ),
|
TOOL_BASE( "pcbnew.InteractiveRouter" ),
|
||||||
m_lastTargetLayer( UNDEFINED_LAYER )
|
m_lastTargetLayer( UNDEFINED_LAYER ),
|
||||||
|
m_inRouterTool( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1394,6 +1395,11 @@ void ROUTER_TOOL::breakTrack()
|
||||||
|
|
||||||
int ROUTER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
|
int ROUTER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
|
if( m_inRouterTool )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
REENTRANCY_GUARD guard( &m_inRouterTool );
|
||||||
|
|
||||||
PNS::ROUTER_MODE mode = aEvent.Parameter<PNS::ROUTER_MODE>();
|
PNS::ROUTER_MODE mode = aEvent.Parameter<PNS::ROUTER_MODE>();
|
||||||
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();
|
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();
|
||||||
VIEW_CONTROLS* controls = getViewControls();
|
VIEW_CONTROLS* controls = getViewControls();
|
||||||
|
|
|
@ -89,6 +89,8 @@ private:
|
||||||
std::shared_ptr<ACTION_MENU> m_trackViaMenu;
|
std::shared_ptr<ACTION_MENU> m_trackViaMenu;
|
||||||
|
|
||||||
int m_lastTargetLayer;
|
int m_lastTargetLayer;
|
||||||
|
|
||||||
|
bool m_inRouterTool; // Re-entrancy guard
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue