HasAutofill should not preclude a primary parameter in the value field

This commit is contained in:
Jeff Young 2023-08-28 17:41:15 +01:00
parent 7ac3e09a08
commit 2c81788299
2 changed files with 7 additions and 5 deletions

View File

@ -177,10 +177,6 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
m_fields.back().SetText( pinMap ); m_fields.back().SetText( pinMap );
storeInValue = true; storeInValue = true;
// In case the storeInValue checkbox is turned off (if it's left on then we'll overwrite
// this field with the actual value):
m_fields[ VALUE_FIELD ].SetText( wxT( "${SIM.PARAMS}" ) );
} }
std::string libraryFilename = SIM_MODEL::GetFieldValue( &m_fields, SIM_LIBRARY::LIBRARY_FIELD ); std::string libraryFilename = SIM_MODEL::GetFieldValue( &m_fields, SIM_LIBRARY::LIBRARY_FIELD );
@ -306,8 +302,14 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
} }
if( storeInValue ) if( storeInValue )
{
curModel().SetIsStoredInValue( true ); curModel().SetIsStoredInValue( true );
// In case the storeInValue checkbox is turned off (if it's left on then we'll overwrite
// this field with the actual value):
m_fields[ VALUE_FIELD ].SetText( wxT( "${SIM.PARAMS}" ) );
}
m_saveInValueCheckbox->SetValue( curModel().IsStoredInValue() ); m_saveInValueCheckbox->SetValue( curModel().IsStoredInValue() );
onRadioButton( dummyEvent ); onRadioButton( dummyEvent );

View File

@ -252,7 +252,7 @@ bool SIM_MODEL_SERIALIZER::ParseParams( const std::string& aParams )
} }
} }
return !m_model.HasPrimaryValue() || m_model.HasAutofill() || isPrimaryValueSet; return !m_model.HasPrimaryValue() || isPrimaryValueSet;
} }