1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 16:47:24 +08:00

Reset text only if it has been changed

This commit is contained in:
EVAST9919 2017-09-23 19:59:34 +03:00
parent 0615f375e1
commit 94269e119e

View File

@ -54,7 +54,12 @@ namespace osu.Game.Screens.Play.BreaksOverlay
private void currentValueChanged(T newValue)
{
valueText.Text = prefix + Format(newValue);
var newText = prefix + Format(newValue);
if (valueText.Text == newText)
return;
valueText.Text = newText;
}
protected virtual string Format(T count) => count.ToString();