diff --git a/src/Artemis.UI/DefaultTypes/PropertyInput/BrushPropertyInputViewModel.cs b/src/Artemis.UI/DefaultTypes/PropertyInput/BrushPropertyInputViewModel.cs index 9f4699243..ea641ad68 100644 --- a/src/Artemis.UI/DefaultTypes/PropertyInput/BrushPropertyInputViewModel.cs +++ b/src/Artemis.UI/DefaultTypes/PropertyInput/BrushPropertyInputViewModel.cs @@ -44,14 +44,6 @@ namespace Artemis.UI.PropertyInput NotifyOfPropertyChange(nameof(SelectedDescriptor)); } - - public override void Dispose() - { - _pluginManagementService.PluginEnabled -= PluginManagementServiceOnPluginManagementLoaded; - _pluginManagementService.PluginDisabled -= PluginManagementServiceOnPluginManagementLoaded; - base.Dispose(); - } - protected override void OnInputValueApplied() { if (LayerProperty.ProfileElement is Layer layer) @@ -67,5 +59,21 @@ namespace Artemis.UI.PropertyInput { UpdateEnumValues(); } + + #region IDisposable + + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + _pluginManagementService.PluginEnabled -= PluginManagementServiceOnPluginManagementLoaded; + _pluginManagementService.PluginDisabled -= PluginManagementServiceOnPluginManagementLoaded; + } + + base.Dispose(disposing); + } + + #endregion } } \ No newline at end of file