Reentrancy guard for placeAnchor (KICAD-A6J).

This commit is contained in:
Jeff Young
2025-07-12 15:38:29 +01:00
parent 4d7cbed3a9
commit cd48cc4007
2 changed files with 7 additions and 0 deletions
@@ -57,6 +57,7 @@ SYMBOL_EDITOR_DRAWING_TOOLS::SYMBOL_EDITOR_DRAWING_TOOLS() :
m_drawSpecificBodyStyle( true ),
m_drawSpecificUnit( false ),
m_inDrawShape( false ),
m_inPlaceAnchor( false ),
m_inTwoClickPlace( false )
{
}
@@ -613,6 +614,11 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape( const TOOL_EVENT& aEvent, std::opt
int SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor( const TOOL_EVENT& aEvent )
{
if( m_inPlaceAnchor )
return 0;
REENTRANCY_GUARD guard( &m_inPlaceAnchor );
m_frame->PushTool( aEvent );
auto setCursor =
@@ -86,6 +86,7 @@ private:
///< Re-entrancy guards
bool m_inDrawShape;
bool m_inPlaceAnchor;
bool m_inTwoClickPlace;
private: