From 3d177e9c2ace1e7b7211cc2ec1f3d78c2ef33ceb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 16 Jan 2018 21:24:25 +0000 Subject: [PATCH] Thaw pcb window to scroll markers into view. Fixes: lp:1606849 * https://bugs.launchpad.net/kicad/+bug/1606849 --- pcbnew/dialogs/dialog_drc.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 80d4096cce..849ccb9c28 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -550,6 +550,7 @@ void DIALOG_DRC_CONTROL::OnMarkerSelectionEvent( wxCommandEvent& event ) { m_brdEditor->CursorGoto( item->GetPointA(), false ); m_brdEditor->GetGalCanvas()->GetView()->SetCenter( VECTOR2D( item->GetPointA() ) ); + RedrawDrawPanel(); } } @@ -573,6 +574,7 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event ) { m_brdEditor->CursorGoto( item->GetPointA(), false ); m_brdEditor->GetGalCanvas()->GetView()->SetCenter( VECTOR2D( item->GetPointA() ) ); + RedrawDrawPanel(); } } @@ -582,7 +584,18 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event ) void DIALOG_DRC_CONTROL::RedrawDrawPanel() { + int freezeCount = 0; + while( m_brdEditor->IsFrozen() ) + { + m_brdEditor->Thaw(); + freezeCount++; + } m_brdEditor->GetCanvas()->Refresh(); + while( freezeCount > 0) + { + m_brdEditor->Freeze(); + freezeCount--; + } }