Re-entrancy guard for length tuner tool.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15268
This commit is contained in:
Jeff Young 2023-08-04 17:36:44 +01:00
parent 9a336eeb87
commit 620b6b7169
2 changed files with 6 additions and 0 deletions

View File

@ -278,6 +278,11 @@ void LENGTH_TUNER_TOOL::setTransitions()
int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
{
if( m_inLengthTuner )
return 0;
REENTRANCY_GUARD guard( &m_inLengthTuner );
// Deselect all items
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear );

View File

@ -51,6 +51,7 @@ private:
PNS::MEANDER_SETTINGS m_savedMeanderSettings;
PNS::ROUTER_MODE m_lastTuneMode;
bool m_inLengthTuner;
};
#endif