diff options
author | Eric Maupin <ermaup@microsoft.com> | 2018-04-05 22:04:59 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2018-04-05 22:04:59 +0300 |
commit | 214e252de2db92b559731fff61256b9c8dad7062 (patch) | |
tree | fffc36a35b352031ea28bf5b3d4a727f9212e7b0 /Xamarin.PropertyEditing | |
parent | e5695c8610cc1533f27add769768ca6c418dacc4 (diff) |
[Core] Fix non-nullable bool multiselect behavior
Diffstat (limited to 'Xamarin.PropertyEditing')
-rw-r--r-- | Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs index 63e9798..2e8a3ac 100644 --- a/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/PropertyViewModel.cs @@ -152,10 +152,8 @@ namespace Xamarin.PropertyEditing.ViewModels } } - MultipleValues = disagree; - // The public setter for Value is a local set for binding - SetCurrentValue (currentValue); + SetCurrentValue (currentValue, disagree); } } @@ -217,11 +215,13 @@ namespace Xamarin.PropertyEditing.ViewModels OnPropertyChanged (nameof (Resource)); } - private bool SetCurrentValue (ValueInfo<TValue> newValue) + private bool SetCurrentValue (ValueInfo<TValue> newValue, bool multipleValues) { - if (!this.isNullable && newValue != null && newValue.Value == null) + if (!this.isNullable && !multipleValues && newValue != null && newValue.Value == null) newValue.Value = DefaultValue; + MultipleValues = multipleValues; + if (this.value == newValue) return false; |