Display conditions - Show affix/prefix in static input

This commit is contained in:
SpoinkyNL committed 2020-07-08 22:36:24 +02:00
1 parent 92dfbb354a
commit e2cfac1437
4 files changed
+20 -5

No files matched your search

@@ -22,9 +22,7 @@ namespace Artemis.UI.Shared.DataModelVisualization.Shared
{
return Parent.IsRootViewModel ? DataModel : base.GetCurrentValue();
}
private void PopulateProperties(IDataModelVisualizationService dataModelVisualizationService)
{
if (Children.Any())
@@ -180,6 +180,10 @@ namespace Artemis.UI.Shared.DataModelVisualization.Shared
new DataModelPropertyAttribute {Name = PropertyInfo.Name.Humanize()};
else
throw new ArtemisSharedUIException("Failed to get property description because plugin info is null but the parent has a datamodel");
// If a property description was provided but the name is null, use the humanized property name
if (PropertyDescription != null && PropertyDescription.Name == null && PropertyInfo != null)
PropertyDescription.Name = PropertyInfo.Name.Humanize();
}
}
}