diff options
author | Dominique Louis <dolouis@microsoft.com> | 2019-10-13 18:56:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-13 18:56:42 +0300 |
commit | 3a5c6ca9415effe920c105d1d0e9fd3c9da7023a (patch) | |
tree | b6713a90caf4a752a342eae58f88b73dab4ad4be /Xamarin.PropertyEditing.Mac/Controls/Custom | |
parent | 2cc0aa2363f22ac7e475bc3e9d83e270fe8a7398 (diff) | |
parent | 49123dd71357fec719a964572cc0dc096f2cbe96 (diff) |
Merge pull request #642 from xamarin/ermau-fix-989518
Fix resource/no resource brush swapping
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/Custom')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs index 7dad34d..9430e25 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs @@ -59,7 +59,7 @@ namespace Xamarin.PropertyEditing.Mac existing.IntersectWith (this.brushTypeTable.Keys);
var removed = new HashSet<CommonBrushType> (this.brushTypeTable.Keys);
- removed.ExceptWith (existing);
+ removed.ExceptWith (ViewModel?.BrushTypes.Values ?? Array.Empty<CommonBrushType>());
foreach (var item in removed.Select (t => new { Type = t, Tab = TabView.Items[this.brushTypeTable[t]] }).ToArray ()) {
RemoveTabViewItem (item.Tab);
@@ -137,7 +137,9 @@ namespace Xamarin.PropertyEditing.Mac if (this.brushTypeTable.TryGetValue (ViewModel.SelectedBrushType, out int index)) { SelectedTabViewItemIndex = index; - }
+ this.filterResource.Hidden = ViewModel.SelectedBrushType != CommonBrushType.Resource; + } else
+ this.filterResource.Hidden = true;
this.inhibitSelection = false; } |