eeschema: fix in populating DC sim settings tab

When filling drop-down list with sources, previous selection should be
saved in local variable and restored if it is still available.
This commit is contained in:
Sylwester Kocjan
2021-08-20 19:23:13 +00:00
committed by Seth Hillbrand
parent 691b53d125
commit eefac5cc59
+2 -2
View File
@@ -392,8 +392,8 @@ void DIALOG_SIM_SETTINGS::updateDCSources( wxChar aType, wxChoice* aSource )
{
wxString prevSelection;
if( aSource->GetCount() )
aSource->GetString( aSource->GetSelection() );
if( !aSource->IsEmpty() )
prevSelection = aSource->GetString( aSource->GetSelection() );
std::vector<wxString> sourcesList;
bool enableSrcSelection = true;