Skip to content

Commit

Permalink
Improvements to "Ctrl+A" behaviour on package pages (fix #2471)
Browse files Browse the repository at this point in the history
marticliment committed Jul 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 4f2f815 commit 2fe2e65
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/UniGetUI/Interface/SoftwarePages/AbstractPackagesPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -80,7 +80,6 @@ protected Package? SelectedItem

public readonly int NewVersionLabelWidth;
public readonly int NewVersionIconWidth;
private readonly bool AllSelected = true;

protected abstract void WhenPackagesLoaded(ReloadReason reason);
protected abstract void WhenPackageCountUpdated();
@@ -368,13 +367,18 @@ public void ReloadTriggered()
}
public void SelectAllTriggered()
{
if (AllSelected)
if (QueryBlock.FocusState == FocusState.Unfocused)
{
FilteredPackages.SelectAll();
}
else
{
FilteredPackages.ClearSelection();
if (!SelectAllCheckBox.IsChecked ?? false)
{
SelectAllCheckBox.IsChecked = true;
FilteredPackages.SelectAll();
}
else
{
SelectAllCheckBox.IsChecked = false;
FilteredPackages.ClearSelection();
}
}
}
protected void AddPackageToSourcesList(Package package)

0 comments on commit 2fe2e65

Please sign in to comment.