Eeschema: fix bus label drag adding a line

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10822
This commit is contained in:
Mike Williams 2022-02-11 11:12:16 -05:00 committed by Seth Hillbrand
parent 68655540eb
commit 21b59b4b6a
1 changed files with 3 additions and 1 deletions

View File

@ -1014,7 +1014,9 @@ void SCH_MOVE_TOOL::getConnectedDragItems( SCH_ITEM* aOriginalItem, const VECTOR
case SCH_HIER_LABEL_T: case SCH_HIER_LABEL_T:
case SCH_GLOBAL_LABEL_T: case SCH_GLOBAL_LABEL_T:
case SCH_DIRECTIVE_LABEL_T: case SCH_DIRECTIVE_LABEL_T:
if( line->HitTest( aPoint, 1 ) ) // Only add a line if this line is unselected,
// if the label and line are both selected they'll move together
if( line->HitTest( aPoint, 1 ) && !line->HasFlag( SELECTED ) )
{ {
// Add a new line so we have something to drag // Add a new line so we have something to drag
newWire = new SCH_LINE( aPoint, line->GetLayer() ); newWire = new SCH_LINE( aPoint, line->GetLayer() );