eeschema: Keep selection with only components

Adding a field to a selection changes the bounding box and count for
rotation.  This can cause odd offsets when the field is rotated against
the selection center rather than the bounding box as well as with the
component.

Fixes: lp:1849078
* https://bugs.launchpad.net/kicad/+bug/1849078
This commit is contained in:
Seth Hillbrand 2019-10-27 10:47:26 -07:00
parent 39241dc0ff
commit e533ea4ae6
1 changed files with 5 additions and 1 deletions

View File

@ -971,8 +971,12 @@ void EE_SELECTION_TOOL::RebuildSelection()
INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* item, void* testData )
{
if( item->IsSelected() )
// If the field and component are selected, only use the component
if( item->IsSelected() && !( item->Type() == SCH_FIELD_T && item->GetParent()
&& item->GetParent()->IsSelected() ) )
{
select( item );
}
return SEARCH_CONTINUE;
};