Fix loading of components with convert parameter set to zero
(cherry picked from commit ab74445df4
)
This commit is contained in:
parent
ee92fa51bc
commit
5f9fa05e21
|
@ -1502,7 +1502,21 @@ SCH_COMPONENT* SCH_LEGACY_PLUGIN::loadComponent( FILE_LINE_READER& aReader )
|
||||||
}
|
}
|
||||||
|
|
||||||
component->SetUnit( unit );
|
component->SetUnit( unit );
|
||||||
component->SetConvert( parseInt( aReader, line, &line ) );
|
|
||||||
|
// Same can also happen with the convert parameter
|
||||||
|
int convert = parseInt( aReader, line, &line );
|
||||||
|
|
||||||
|
if( convert == 0 )
|
||||||
|
{
|
||||||
|
convert = 1;
|
||||||
|
|
||||||
|
// Set the file as modified so the user can be warned.
|
||||||
|
if( m_rootSheet && m_rootSheet->GetScreen() )
|
||||||
|
m_rootSheet->GetScreen()->SetModify();
|
||||||
|
}
|
||||||
|
|
||||||
|
component->SetConvert( convert );
|
||||||
|
|
||||||
component->SetTimeStamp( parseHex( aReader, line, &line ) );
|
component->SetTimeStamp( parseHex( aReader, line, &line ) );
|
||||||
}
|
}
|
||||||
else if( strCompare( "P", line, &line ) )
|
else if( strCompare( "P", line, &line ) )
|
||||||
|
|
Loading…
Reference in New Issue