Browse Source

Properly initialize sheets when loading them from ERC dialog

When displaying a sheet from this path, it's possible the sheet will
not have been initialized yet.  Call DisplayCurrentSheet() to make sure
it is initialized, and then call RedrawScreen to update the zoom level.

Fixes: lp:1824362
* https://bugs.launchpad.net/kicad/+bug/1824362

(cherry picked from commit 1c235a5c89)
pull/13/head
Jon Evans 7 years ago
parent
commit
734e61d4c2
  1. 5
      eeschema/dialogs/dialog_erc.cpp

5
eeschema/dialogs/dialog_erc.cpp

@ -281,9 +281,10 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxHtmlLinkEvent& event )
if( sheetList[i] != m_parent->GetCurrentSheet() )
{
sheetList[i].LastScreen()->SetZoom( m_parent->GetScreen()->GetZoom() );
m_parent->SetCurrentSheet( sheetList[i] );
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
m_parent->DisplayCurrentSheet();
sheetList[i].LastScreen()->SetZoom( m_parent->GetScreen()->GetZoom() );
m_parent->RedrawScreen( m_parent->GetScrollCenterPosition(), false );
}
m_lastMarkerFound = marker;

Loading…
Cancel
Save