Fix migrate settings dialog ui bug

Fixes https://gitlab.com/kicad/code/kicad/issues/6258
This commit is contained in:
Michael Kavanagh 2020-11-28 14:55:32 +00:00 committed by jean-pierre charras
parent ebf0cb3612
commit b8303a3484
1 changed files with 5 additions and 0 deletions

View File

@ -53,10 +53,14 @@ bool DIALOG_MIGRATE_SETTINGS::TransferDataToWindow()
std::vector<wxString> paths; std::vector<wxString> paths;
// SetValue does not fire the "OnRadioButton" event, so have to fabricate this
wxCommandEvent dummy;
if( !m_manager->GetPreviousVersionPaths( &paths ) ) if( !m_manager->GetPreviousVersionPaths( &paths ) )
{ {
m_btnPrevVer->SetLabelText( _( "Import settings from a previous version (none found)" ) ); m_btnPrevVer->SetLabelText( _( "Import settings from a previous version (none found)" ) );
m_btnUseDefaults->SetValue( true ); m_btnUseDefaults->SetValue( true );
OnDefaultSelected( dummy );
} }
else else
{ {
@ -67,6 +71,7 @@ bool DIALOG_MIGRATE_SETTINGS::TransferDataToWindow()
m_cbPath->SetSelection( 0 ); m_cbPath->SetSelection( 0 );
m_btnPrevVer->SetValue( true ); m_btnPrevVer->SetValue( true );
OnPrevVerSelected( dummy );
} }
Fit(); Fit();