Fix breakage in wire moving/dragging/etc.

Fixes: lp:1832750
* https://bugs.launchpad.net/kicad/+bug/1832750
This commit is contained in:
Jeff Young 2019-06-13 19:57:11 +01:00
parent 8f84c3ec4f
commit 8cc1e2b5e7
2 changed files with 10 additions and 1 deletions

View File

@ -723,7 +723,7 @@ bool EE_SELECTION_TOOL::selectMultiple()
* Left > Right : Select objects that are fully enclosed by selection * Left > Right : Select objects that are fully enclosed by selection
* Right > Left : Select objects that are crossed by selection * Right > Left : Select objects that are crossed by selection
*/ */
bool windowSelection = width >= 0 ? true : false; bool windowSelection = width >= 0;
if( view->IsMirroredX() ) if( view->IsMirroredX() )
windowSelection = !windowSelection; windowSelection = !windowSelection;
@ -749,6 +749,8 @@ bool EE_SELECTION_TOOL::selectMultiple()
} }
} }
m_selection.SetIsHover( false );
// Inform other potentially interested tools // Inform other potentially interested tools
if( !m_selection.Empty() ) if( !m_selection.Empty() )
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent ); 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 ) int EE_SELECTION_TOOL::AddItemToSel( const TOOL_EVENT& aEvent )
{ {
AddItemToSel( aEvent.Parameter<EDA_ITEM*>() ); AddItemToSel( aEvent.Parameter<EDA_ITEM*>() );
m_selection.SetIsHover( false );
return 0; 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 ) int EE_SELECTION_TOOL::AddItemsToSel( const TOOL_EVENT& aEvent )
{ {
AddItemsToSel( aEvent.Parameter<EDA_ITEMS*>(), false ); AddItemsToSel( aEvent.Parameter<EDA_ITEMS*>(), false );
m_selection.SetIsHover( false );
return 0; 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 ) int EE_SELECTION_TOOL::RemoveItemFromSel( const TOOL_EVENT& aEvent )
{ {
RemoveItemFromSel( aEvent.Parameter<EDA_ITEM*>() ); RemoveItemFromSel( aEvent.Parameter<EDA_ITEM*>() );
m_selection.SetIsHover( false );
return 0; 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 ) int EE_SELECTION_TOOL::RemoveItemsFromSel( const TOOL_EVENT& aEvent )
{ {
RemoveItemsFromSel( aEvent.Parameter<EDA_ITEMS*>(), false ); RemoveItemsFromSel( aEvent.Parameter<EDA_ITEMS*>(), false );
m_selection.SetIsHover( false );
return 0; return 0;
} }

View File

@ -204,6 +204,9 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
{ {
if( !it->IsSelected() ) if( !it->IsSelected() )
it->ClearFlags( STARTPOINT | ENDPOINT | SELECTEDNODE ); it->ClearFlags( STARTPOINT | ENDPOINT | SELECTEDNODE );
if( !selection.IsHover() && it->IsSelected() )
it->SetFlags( STARTPOINT | ENDPOINT );
} }
if( m_isDragOperation ) if( m_isDragOperation )