Data model events - Improved condition conversion code

This commit is contained in:
SpoinkyNL committed 2020-10-22 19:36:24 +02:00
1 parent 03b0e83ed8
commit b8fa8779d9
10 files changed
+157 -80

No files matched your search

@@ -235,7 +235,6 @@ namespace Artemis.UI.Shared
if (toRemoveDynamic.Any())
Children.RemoveRange(toRemoveDynamic);
}
private DataModelVisualizationViewModel CreateChild(IDataModelUIService dataModelUIService, string path, int depth)
{
if (depth > MaxDepth)
@@ -265,7 +264,7 @@ namespace Artemis.UI.Shared
if (propertyType.IsGenericEnumerable())
return new DataModelListViewModel(DataModel, this, dataModelPath) {Depth = depth};
if (propertyType == typeof(DataModelEvent) || propertyType.IsGenericType && propertyType.GetGenericTypeDefinition() == typeof(DataModelEvent<>))
return new DataModelEventViewModel(DataModel, this, dataModelPath) { Depth = depth };
return new DataModelEventViewModel(DataModel, this, dataModelPath) {Depth = depth};
// For other value types create a child view model
if (propertyType.IsClass || propertyType.IsStruct())
return new DataModelPropertiesViewModel(DataModel, this, dataModelPath) {Depth = depth};