1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Fix Tooltip not updating in special case

When the Bindvalue of the Sliderbar gets changed by a line like "Bindable.Value = ..." the sliderbar will only update the nubs but wont run any methods which contain the updateToolTipText(T value) function.
Example scenario:
Two interlinked sliderbars which change the value of each other in certain cases.
This commit is contained in:
chrisny286 2019-01-22 18:29:30 +01:00
parent e54771c817
commit 09a2b287f9

View File

@ -96,6 +96,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
updateTooltipText(Current.Value); updateTooltipText(Current.Value);
base.LoadComplete(); base.LoadComplete();
CurrentNumber.ValueChanged += _ => updateTooltipText(_);
} }
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)
@ -126,7 +127,6 @@ namespace osu.Game.Graphics.UserInterface
{ {
base.OnUserChange(value); base.OnUserChange(value);
playSample(value); playSample(value);
updateTooltipText(value);
} }
private void playSample(T value) private void playSample(T value)