Check if symbol is disabled first

By checking for disabledness of the symbol first we skip potentially unnecessary
validation that in turn would throw an unnecessary warning

Fixes https://gitlab.com/kicad/code/kicad/issues/7338
This commit is contained in:
Julian Fellinger 2021-03-13 21:48:19 +01:00 committed by Seth Hillbrand
parent 573dd36515
commit de12ebf16f
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ bool DIALOG_SPICE_MODEL::TransferDataFromWindow()
// Passive
if( page == m_passive )
{
if( !m_passive->Validate() && !m_disabled->GetValue() )
if( !m_disabled->GetValue() && !m_passive->Validate() )
return false;
switch( m_pasType->GetSelection() )