Fix breakage in wire moving/dragging/etc.
Fixes: lp:1832750 * https://bugs.launchpad.net/kicad/+bug/1832750
This commit is contained in:
parent
8f84c3ec4f
commit
8cc1e2b5e7
|
@ -723,7 +723,7 @@ bool EE_SELECTION_TOOL::selectMultiple()
|
|||
* Left > Right : Select objects that are fully enclosed by selection
|
||||
* Right > Left : Select objects that are crossed by selection
|
||||
*/
|
||||
bool windowSelection = width >= 0 ? true : false;
|
||||
bool windowSelection = width >= 0;
|
||||
|
||||
if( view->IsMirroredX() )
|
||||
windowSelection = !windowSelection;
|
||||
|
@ -749,6 +749,8 @@ bool EE_SELECTION_TOOL::selectMultiple()
|
|||
}
|
||||
}
|
||||
|
||||
m_selection.SetIsHover( false );
|
||||
|
||||
// Inform other potentially interested tools
|
||||
if( !m_selection.Empty() )
|
||||
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
|
||||
|
@ -845,6 +847,7 @@ int EE_SELECTION_TOOL::SelectConnection( const TOOL_EVENT& aEvent )
|
|||
int EE_SELECTION_TOOL::AddItemToSel( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
AddItemToSel( aEvent.Parameter<EDA_ITEM*>() );
|
||||
m_selection.SetIsHover( false );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -865,6 +868,7 @@ void EE_SELECTION_TOOL::AddItemToSel( EDA_ITEM* aItem, bool aQuietMode )
|
|||
int EE_SELECTION_TOOL::AddItemsToSel( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
AddItemsToSel( aEvent.Parameter<EDA_ITEMS*>(), false );
|
||||
m_selection.SetIsHover( false );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -886,6 +890,7 @@ void EE_SELECTION_TOOL::AddItemsToSel( EDA_ITEMS* aList, bool aQuietMode )
|
|||
int EE_SELECTION_TOOL::RemoveItemFromSel( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
RemoveItemFromSel( aEvent.Parameter<EDA_ITEM*>() );
|
||||
m_selection.SetIsHover( false );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -906,6 +911,7 @@ void EE_SELECTION_TOOL::RemoveItemFromSel( EDA_ITEM* aItem, bool aQuietMode )
|
|||
int EE_SELECTION_TOOL::RemoveItemsFromSel( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
RemoveItemsFromSel( aEvent.Parameter<EDA_ITEMS*>(), false );
|
||||
m_selection.SetIsHover( false );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -204,6 +204,9 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
if( !it->IsSelected() )
|
||||
it->ClearFlags( STARTPOINT | ENDPOINT | SELECTEDNODE );
|
||||
|
||||
if( !selection.IsHover() && it->IsSelected() )
|
||||
it->SetFlags( STARTPOINT | ENDPOINT );
|
||||
}
|
||||
|
||||
if( m_isDragOperation )
|
||||
|
|
Loading…
Reference in New Issue