Do not allow drag selection or drag move when already moving something
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7800
This commit is contained in:
parent
6cdc3664ba
commit
4ddb942ec0
|
@ -536,6 +536,13 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
else if( evt->IsDrag( BUT_LEFT ) )
|
||||
{
|
||||
// Is another tool already moving a new object? Don't allow a drag start
|
||||
if( !m_selection.Empty() && m_selection[0]->HasFlag( IS_NEW | IS_MOVED ) )
|
||||
{
|
||||
evt->SetPassEvent();
|
||||
continue;
|
||||
}
|
||||
|
||||
// drag with LMB? Select multiple objects (or at least draw a selection box) or
|
||||
// drag them
|
||||
if( SCH_EDIT_FRAME* schframe = dynamic_cast<SCH_EDIT_FRAME*>( m_frame ) )
|
||||
|
|
|
@ -905,6 +905,7 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
|||
SCH_ITEM* item = nullptr;
|
||||
KIGFX::VIEW_CONTROLS* controls = getViewControls();
|
||||
EE_GRID_HELPER grid( m_toolMgr );
|
||||
|
||||
if( m_inTwoClickPlace )
|
||||
return 0;
|
||||
else
|
||||
|
|
|
@ -345,6 +345,13 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
else if( evt->IsDrag( BUT_LEFT ) )
|
||||
{
|
||||
// Is another tool already moving a new object? Don't allow a drag start
|
||||
if( !m_selection.Empty() && m_selection[0]->HasFlag( IS_NEW | IS_MOVED ) )
|
||||
{
|
||||
evt->SetPassEvent();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Drag with LMB? Select multiple objects (or at least draw a selection box)
|
||||
// or drag them
|
||||
m_frame->FocusOnItem( nullptr );
|
||||
|
|
Loading…
Reference in New Issue