From a846bd592edc62c11d316498df39b93ce89c5fde Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Sun, 21 May 2023 15:33:37 +0100 Subject: [PATCH] Core - Do not load abstract plugin features UI - Replace Equals check with EqualityComparer --- src/Artemis.Core/Services/PluginManagementService.cs | 2 +- .../Services/PropertyInput/PropertyInputViewModel.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Artemis.Core/Services/PluginManagementService.cs b/src/Artemis.Core/Services/PluginManagementService.cs index fb304baf5..964f5b0dd 100644 --- a/src/Artemis.Core/Services/PluginManagementService.cs +++ b/src/Artemis.Core/Services/PluginManagementService.cs @@ -396,7 +396,7 @@ internal class PluginManagementService : IPluginManagementService List featureTypes; try { - featureTypes = plugin.Assembly.GetTypes().Where(t => typeof(PluginFeature).IsAssignableFrom(t)).ToList(); + featureTypes = plugin.Assembly.GetTypes().Where(t => typeof(PluginFeature).IsAssignableFrom(t) && !t.IsAbstract).ToList(); } catch (ReflectionTypeLoadException e) { diff --git a/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs b/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs index 1382de03b..ede68d21f 100644 --- a/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs +++ b/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Reactive.Disposables; using System.Reactive.Linq; @@ -193,7 +194,7 @@ public abstract class PropertyInputViewModel : PropertyInputViewModel _updating = true; // Avoid unnecessary UI updates and validator cycles - if (Equals(_inputValue, LayerProperty.CurrentValue)) + if (EqualityComparer.Default.Equals(_inputValue, LayerProperty.CurrentValue)) return; // Override the input value