mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
enhance: use Click
event instead of IsCheckedChanged
to reduce the times of calling update filter (#513)
This commit is contained in:
parent
a8ce4e6d95
commit
8e31ea9140
2 changed files with 6 additions and 5 deletions
|
@ -47,8 +47,9 @@
|
||||||
Classes="filter"
|
Classes="filter"
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
IsCheckedChanged="OnToggleFilter"
|
Click="OnToggleFilterClicked"
|
||||||
IsChecked="{Binding IsFiltered}"
|
IsChecked="{Binding IsFiltered, Mode=TwoWay}"
|
||||||
|
IsVisible="{Binding !IsFolder}"
|
||||||
ToolTip.Tip="{DynamicResource Text.Filter}"/>
|
ToolTip.Tip="{DynamicResource Text.Filter}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
@ -78,8 +79,8 @@
|
||||||
Classes="filter"
|
Classes="filter"
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
IsCheckedChanged="OnToggleFilter"
|
Click="OnToggleFilterClicked"
|
||||||
IsChecked="{Binding IsFiltered}"
|
IsChecked="{Binding IsFiltered, Mode=TwoWay}"
|
||||||
ToolTip.Tip="{DynamicResource Text.Filter}"/>
|
ToolTip.Tip="{DynamicResource Text.Filter}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
|
@ -247,7 +247,7 @@ namespace SourceGit.Views
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnToggleFilter(object sender, RoutedEventArgs e)
|
private void OnToggleFilterClicked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is ToggleButton toggle && DataContext is ViewModels.Repository repo)
|
if (sender is ToggleButton toggle && DataContext is ViewModels.Repository repo)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue