Reduce reliance on MANDATORY_FIELDS and their implied order.

This commit is contained in:
Jeff Young
2025-01-22 17:51:57 +00:00
parent be38fa5cac
commit e19bce2f93
40 changed files with 312 additions and 284 deletions
+5 -5
View File
@@ -830,13 +830,13 @@ void FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(
}
}
for( int ii = symbol.GetFields().size() - 1; ii >= MANDATORY_FIELDS; ii-- )
for( int ii = symbol.GetFields().size() - 1; ii >= 0; ii-- )
{
if( symbol.GetFields()[ii].IsMandatory() || symbol.GetFields()[ii].IsPrivate() )
continue;
if( fieldStore.count( symbol.GetFields()[ii].GetName() ) == 0 )
{
if( !symbol.GetFields()[ii].IsPrivate() )
symbol.GetFields().erase( symbol.GetFields().begin() + ii );
}
symbol.GetFields().erase( symbol.GetFields().begin() + ii );
}
}