Thaw pcb window to scroll markers into view.

Fixes: lp:1606849
* https://bugs.launchpad.net/kicad/+bug/1606849
This commit is contained in:
Jeff Young 2018-01-16 21:24:25 +00:00 committed by Maciej Suminski
parent ac1771a9f0
commit 3d177e9c2a
1 changed files with 13 additions and 0 deletions

View File

@ -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--;
}
}