-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only draw path visualiser when hovered or single slider is selected #20965
Conversation
osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs
Outdated
Show resolved
Hide resolved
@@ -100,6 +105,8 @@ public override bool HandleQuickDeletion() | |||
return true; | |||
} | |||
|
|||
private bool hasSingleObjectSelected => editorBeatmap == null || selectedObjects.Count == 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did this change come to be? hasSingleObjectSelected
being true
if editorBeatmap
is null blows my mind a bit. If the purpose of this property has changed somehow, can we at least rename it to read less WTF?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit of an edge case to make tests work.. I just added it to guarantee existing behaviour didn't change, but may be worth removing and fixing any tests themselves to match (if any actually break).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like there's a nonzero chance that addressing the other review comment I left may render this change unnecessary. Probably worth a go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that's the case, I've removed the weird null check here now.
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This matches stable editor behaviour.
Now, slider path visualisations will only be shown when
osu.Game.Tests.2022-10-27.at.05.54.22.mp4
This improves performance when selecting all objects by around 25% (on Disco Prince, update 44 / draw 22, up from update 33 / draw 18). Nothing too big but it's a starting point.