eeschema: Fix refreshing of selection shadow on text fields when zooming.

Fixes #3652 | https://gitlab.com/kicad/code/kicad/issues/3652
This commit is contained in:
Jonatan Liljedahl 2019-12-10 13:07:11 +01:00
parent 30da2b31ea
commit 25abdd9e9c
1 changed files with 18 additions and 1 deletions

View File

@ -394,7 +394,24 @@ void SCH_BASE_FRAME::RefreshSelection()
KIGFX::SCH_VIEW* view = GetCanvas()->GetView();
for( EDA_ITEM* item : selection )
{
EDA_ITEM* parent = item->GetParent();
if( item->Type() == SCH_SHEET_PIN_T )
{
// Sheet pins aren't in the view. Refresh their parent.
if( parent )
GetCanvas()->GetView()->Update( parent );
}
else
{
view->Update( item, KIGFX::REPAINT );
// Component children are drawn from their parents. Mark them for re-paint.
if( parent && parent->Type() == SCH_COMPONENT_T )
GetCanvas()->GetView()->Update( parent, KIGFX::REPAINT );
}
}
}
}