Add some defensive code for double-moves.
Fixes https://gitlab.com/kicad/code/kicad/issues/7665 Fixes https://gitlab.com/kicad/code/kicad/issues/7502
This commit is contained in:
parent
9eb2113a50
commit
a9ea617069
|
@ -174,6 +174,13 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else if( evt->IsActivate() )
|
else if( evt->IsActivate() )
|
||||||
{
|
{
|
||||||
|
if( component && evt->IsMoveTool() )
|
||||||
|
{
|
||||||
|
// we're already moving our own item; ignore the move tool
|
||||||
|
evt->SetPassEvent( false );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( component )
|
if( component )
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
@ -400,6 +407,13 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else if( evt->IsActivate() )
|
else if( evt->IsActivate() )
|
||||||
{
|
{
|
||||||
|
if( image && evt->IsMoveTool() )
|
||||||
|
{
|
||||||
|
// we're already moving our own item; ignore the move tool
|
||||||
|
evt->SetPassEvent( false );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( image )
|
if( image )
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
@ -966,6 +980,13 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else if( evt->IsActivate() )
|
else if( evt->IsActivate() )
|
||||||
{
|
{
|
||||||
|
if( item && evt->IsMoveTool() )
|
||||||
|
{
|
||||||
|
// we're already moving our own item; ignore the move tool
|
||||||
|
evt->SetPassEvent( false );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( item )
|
if( item )
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
@ -1177,6 +1198,13 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else if( evt->IsActivate() )
|
else if( evt->IsActivate() )
|
||||||
{
|
{
|
||||||
|
if( sheet && evt->IsMoveTool() )
|
||||||
|
{
|
||||||
|
// we're already drawing our own item; ignore the move tool
|
||||||
|
evt->SetPassEvent( false );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( sheet )
|
if( sheet )
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue