mirror of
https://github.com/ppy/osu
synced 2025-01-05 21:59:46 +00:00
Prevent checkbox from toggle on when column have no valid panels
This commit is contained in:
parent
e43c233b48
commit
22c6d6c526
@ -151,7 +151,10 @@ namespace osu.Game.Overlays.Mods
|
|||||||
if (toggleAllCheckbox != null && !SelectionAnimationRunning)
|
if (toggleAllCheckbox != null && !SelectionAnimationRunning)
|
||||||
{
|
{
|
||||||
toggleAllCheckbox.Alpha = availableMods.Any(panel => panel.IsValid) ? 1 : 0;
|
toggleAllCheckbox.Alpha = availableMods.Any(panel => panel.IsValid) ? 1 : 0;
|
||||||
toggleAllCheckbox.Current.Value = availableMods.Where(panel => panel.IsValid).All(panel => panel.Active.Value);
|
|
||||||
|
//Prevent checkbox from checking when column have on valid panels
|
||||||
|
if (availableMods.Any(panel => panel.IsValid))
|
||||||
|
toggleAllCheckbox.Current.Value = availableMods.Where(panel => panel.IsValid).All(panel => panel.Active.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user