Schematic: duplicate on hover: grabs symbol instead of field

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13495
This commit is contained in:
Mike Williams 2023-01-18 13:35:52 -05:00
parent 8f4486752d
commit 144cd0b7f2
1 changed files with 6 additions and 0 deletions

View File

@ -1213,6 +1213,12 @@ bool SCH_EDITOR_CONTROL::doCopy( bool aUseDuplicateClipboard )
SCH_SHEET* sheet = (SCH_SHEET*) item;
m_supplementaryClipboard[ sheet->GetFileName() ] = sheet->GetScreen();
}
else if( item->Type() == SCH_FIELD_T )
{
// Most of the time the user is trying to duplicate the parent symbol
// and the field text is in it
selection.Add( item->GetParent() );
}
}
STRING_FORMATTER formatter;