Fix editor selection behaviour regressions due to new path visualiser optimisation

This commit is contained in:
Dean Herbert
2022-11-04 19:36:59 +09:00
parent d24e10e955
commit 20021551bb

View File

@ -119,10 +119,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
{ {
updateVisualDefinition(); updateVisualDefinition();
// In the case more than a single object is selected, block hover from arriving at sliders behind this one. return base.OnHover(e);
// Without doing this, the path visualisers of potentially hundreds of sliders will render, which is not only
// visually noisy but also functionally useless.
return !hasSingleObjectSelected;
} }
protected override void OnHoverLost(HoverLostEvent e) protected override void OnHoverLost(HoverLostEvent e)
@ -148,7 +145,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
private void updateVisualDefinition() private void updateVisualDefinition()
{ {
// To reduce overhead of drawing these blueprints, only add extra detail when hovered or when only this slider is selected. // To reduce overhead of drawing these blueprints, only add extra detail when hovered or when only this slider is selected.
if (IsSelected && (hasSingleObjectSelected || IsHovered)) if (IsSelected && selectedObjects.Count == 1)
{ {
if (ControlPointVisualiser == null) if (ControlPointVisualiser == null)
{ {