GRID_HELPER: Update target geometry when moving
Setting a previously visible item visible is a nop. If the target was visible, make sure to update the geometry Fixes: lp:1802405 * https://bugs.launchpad.net/kicad/+bug/1802405
This commit is contained in:
parent
f1f4473d8b
commit
70e660dfe8
|
@ -292,7 +292,12 @@ VECTOR2I GRID_HELPER::BestSnapAnchor( const VECTOR2I& aOrigin, const LSET& aLaye
|
|||
if( !m_enableGrid || snapDist <= gridDist )
|
||||
{
|
||||
m_viewSnapPoint.SetPosition( nearest->pos );
|
||||
m_frame->GetGalCanvas()->GetView()->SetVisible( &m_viewSnapPoint, true );
|
||||
|
||||
if( m_frame->GetGalCanvas()->GetView()->IsVisible( &m_viewSnapPoint ) )
|
||||
m_frame->GetGalCanvas()->GetView()->Update( &m_viewSnapPoint, KIGFX::GEOMETRY);
|
||||
else
|
||||
m_frame->GetGalCanvas()->GetView()->SetVisible( &m_viewSnapPoint, true );
|
||||
|
||||
return nearest->pos;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue