Skip to content

Commit c0cf1bd

Browse files
committed
Do not offer abstracts or interfaces when getting user to pick a type for an InstanceOfProperty
1 parent d3b9b26 commit c0cf1bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/UI/ValueFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ internal static bool GetNewValue(Design design, Property property, object? oldVa
246246
if (Modals.Get<Type>(
247247
property.PropertyInfo.Name,
248248
"New Value",
249-
typeof(Label).Assembly.GetTypes().Where(inst.MustBeDerivedFrom.IsAssignableFrom).ToArray(),
249+
typeof(Label).Assembly.GetTypes()
250+
.Where(t=>inst.MustBeDerivedFrom.IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface).ToArray(),
250251
inst.GetValue()?.GetType(),
251252
out Type? typeChosen))
252253
{

0 commit comments

Comments
 (0)