Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Maupin <ermaup@microsoft.com>2019-10-02 23:17:25 +0300
committerEric Maupin <ermaup@microsoft.com>2019-10-02 23:17:25 +0300
commit49123dd71357fec719a964572cc0dc096f2cbe96 (patch)
tree06d3be6c715c6e5c87d1bbbd1a9910a511f37b93 /Xamarin.PropertyEditing.Mac
parent4cc89d51c659bc619c0b62c8026a95fefe86cb3c (diff)
[mac] Fix filter visibility on reuse
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs6
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;
}