From 7e23b42f670e9436981c5eea6aca557f8e922510 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Fri, 18 May 2018 13:36:49 -0500 Subject: Make BrushEditorControl subclass the improved generic PropertyEditorControl This fixes some missing initialization logic that was causing a crash in the PropertyButton popup. --- Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs') diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs index 03cc76a..19e68da 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs @@ -35,7 +35,7 @@ namespace Xamarin.PropertyEditing.Mac } } - internal class BrushEditorControl : PropertyEditorControl + internal class BrushEditorControl : PropertyEditorControl { public BrushEditorControl () { @@ -68,10 +68,6 @@ namespace Xamarin.PropertyEditing.Mac UpdateTheme (); } - internal new BrushPropertyViewModel ViewModel { - get => (BrushPropertyViewModel)base.ViewModel; - set => base.ViewModel = value; - } readonly ColorPopUpButton popUpButton; //readonly BrushTabViewController colorEditor; @@ -124,7 +120,6 @@ namespace Xamarin.PropertyEditing.Mac protected override void UpdateValue () { - SetEnabled (); this.brushTabViewController.ViewModel = ViewModel; this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? popover : null; @@ -142,10 +137,5 @@ namespace Xamarin.PropertyEditing.Mac } } } - - protected override void OnViewModelChanged (PropertyViewModel oldModel) - { - UpdateValue (); - } } } -- cgit v1.2.3