Pull some fixes from master.
This commit is contained in:
parent
3573b97bfc
commit
f67a477f65
|
@ -1030,15 +1030,28 @@ int ERC_TESTER::TestSimModelIssues()
|
||||||
|
|
||||||
for( SCH_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
|
for( SCH_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
|
||||||
{
|
{
|
||||||
|
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||||
|
|
||||||
|
// Power symbols and other symbols which have the reference starting with "#" are
|
||||||
|
// not included in simulation
|
||||||
|
if( symbol->GetRef( &sheet ).StartsWith( '#' )
|
||||||
|
|| symbol->GetFieldText( SIM_ENABLE_FIELD ) == wxT( "0" ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Reset for each symbol
|
// Reset for each symbol
|
||||||
msg.Clear();
|
msg.Clear();
|
||||||
|
|
||||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
|
||||||
SIM_LIBRARY::MODEL model = libMgr.CreateModel( &sheet, *symbol );
|
SIM_LIBRARY::MODEL model = libMgr.CreateModel( &sheet, *symbol );
|
||||||
|
|
||||||
if( !msg.IsEmpty() )
|
if( !msg.IsEmpty() )
|
||||||
{
|
{
|
||||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_SIMULATION_MODEL );
|
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_SIMULATION_MODEL );
|
||||||
|
|
||||||
|
//Remove \n and \r at e.o.l if any:
|
||||||
|
msg.Trim();
|
||||||
|
|
||||||
ercItem->SetErrorMessage( msg );
|
ercItem->SetErrorMessage( msg );
|
||||||
ercItem->SetItems( symbol );
|
ercItem->SetItems( symbol );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue