Skip to content

Commit c9cd8a7

Browse files
committed
Stop churning results on filter and group, freshen up toolbar.
1 parent d84f3e7 commit c9cd8a7

File tree

12 files changed

+360
-242
lines changed

12 files changed

+360
-242
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Globalization;
3+
using System.Windows.Data;
4+
5+
namespace Rubberduck.UI.Inspections
6+
{
7+
internal class InspectionFilterToBooleanConverter : IValueConverter
8+
{
9+
private InspectionResultsFilter _state;
10+
11+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12+
{
13+
if (!(parameter is InspectionResultsFilter flag) ||
14+
!(value is InspectionResultsFilter bound))
15+
{
16+
return _state;
17+
}
18+
19+
_state = bound;
20+
return _state.HasFlag(flag);
21+
}
22+
23+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24+
{
25+
if (!(parameter is InspectionResultsFilter flag) ||
26+
!(value is bool isSet))
27+
{
28+
return _state;
29+
}
30+
31+
_state ^= flag;
32+
return _state;
33+
}
34+
}
35+
}

Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml

Lines changed: 73 additions & 101 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)