Alternative fix for lp:1741050
Calling wxListBox::SetSelection( wxNOT_FOUND ) changes the internal state of the widget without the intended visual effect (show nothing selected). It leads to a situation when the default choice is overridden with wxNOT_FOUND, even though the list box shows a valid value. As there is no point in calling wxListBox::SetSelection( wxNOT_FOUND ), the confusing call has been removed.
This commit is contained in:
parent
12c6b3337b
commit
7fe6249ac3
|
@ -134,7 +134,6 @@ bool DIALOG_SPICE_MODEL::TransferDataFromWindow()
|
|||
|
||||
switch( m_modelType->GetSelection() )
|
||||
{
|
||||
case -1: break;
|
||||
case 0: m_fieldsTmp[SF_PRIMITIVE] = (char) SP_SUBCKT; break;
|
||||
case 1: m_fieldsTmp[SF_PRIMITIVE] = (char) SP_BJT; break;
|
||||
case 2: m_fieldsTmp[SF_PRIMITIVE] = (char) SP_MOSFET; break;
|
||||
|
@ -756,7 +755,6 @@ void DIALOG_SPICE_MODEL::onModelSelected( wxCommandEvent& event )
|
|||
}
|
||||
else
|
||||
{
|
||||
m_modelType->SetSelection( wxNOT_FOUND );
|
||||
m_libraryContents->ShowPosition( 0 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue