Make sure initially loaded footprint is rendered.

Also sets the initial footprint to the current footprint when
doing a Choose Footprint from the Eeschema Edit Property
dialog.

Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
This commit is contained in:
Jeff Young 2018-06-12 13:38:31 +01:00
parent 16411c8c1e
commit 660aed71b4
2 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ void DIALOG_EDIT_ONE_FIELD::init()
void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent ) void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent )
{ {
// pick a footprint using the footprint picker. // pick a footprint using the footprint picker.
wxString fpid; wxString fpid = m_TextValue->GetValue();
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true ); KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true );

View File

@ -233,11 +233,10 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
} }
drawPanel->DisplayBoard( m_Pcb ); drawPanel->DisplayBoard( m_Pcb );
updateView();
m_auimgr.SetManagedWindow( this ); m_auimgr.SetManagedWindow( this );
wxSize minsize(100,-1); // Min size of list boxes wxSize minsize( 100, -1 ); // Min size of list boxes
// Main toolbar is initially docked at the top of the main window and dockable on any side. // Main toolbar is initially docked at the top of the main window and dockable on any side.
// The close button is disable because the footprint viewer has no main menu to re-enable it. // The close button is disable because the footprint viewer has no main menu to re-enable it.
@ -303,6 +302,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
GetGalCanvas()->GetGAL()->SetAxesEnabled( true ); GetGalCanvas()->GetGAL()->SetAxesEnabled( true );
UseGalCanvas( switchToGalCanvas ); UseGalCanvas( switchToGalCanvas );
updateView();
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
{ {