Add a re-entrancy guard to PCB_POINT_EDITOR.
This commit is contained in:
parent
74075fe4d6
commit
280fe976c4
|
@ -111,7 +111,8 @@ PCB_POINT_EDITOR::PCB_POINT_EDITOR() :
|
|||
m_original( VECTOR2I( 0, 0 ) ),
|
||||
m_refill( false ),
|
||||
m_arcEditMode( ARC_EDIT_MODE::KEEP_CENTER_ADJUST_ANGLE_RADIUS ),
|
||||
m_altConstrainer( VECTOR2I( 0, 0 ) )
|
||||
m_altConstrainer( VECTOR2I( 0, 0 ) ),
|
||||
m_inPointEditorTool( false )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -455,6 +456,11 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
|
|||
if( !m_selectionTool || aEvent.Matches( EVENTS::InhibitSelectionEditing ) )
|
||||
return 0;
|
||||
|
||||
if( m_inPointEditorTool )
|
||||
return 0;
|
||||
|
||||
REENTRANCY_GUARD guard( &m_inPointEditorTool );
|
||||
|
||||
PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>();
|
||||
const PCB_SELECTION& selection = m_selectionTool->GetSelection();
|
||||
|
||||
|
|
|
@ -190,6 +190,8 @@ private:
|
|||
std::shared_ptr<EDIT_CONSTRAINT<EDIT_POINT>> m_altConstraint;
|
||||
EDIT_POINT m_altConstrainer;
|
||||
|
||||
bool m_inPointEditorTool; // Re-entrancy guard
|
||||
|
||||
static const unsigned int COORDS_PADDING; // Padding from coordinates limits for this tool
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue