From 70e660dfe82fa4f783dd2eabd8f03d507c67c529 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 9 Nov 2018 06:11:44 -0800 Subject: [PATCH] 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 --- pcbnew/tools/grid_helper.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/grid_helper.cpp b/pcbnew/tools/grid_helper.cpp index 0402e9a86f..31a68318cd 100644 --- a/pcbnew/tools/grid_helper.cpp +++ b/pcbnew/tools/grid_helper.cpp @@ -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; } }