1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:02:58 +08:00

Change editor timing screen seek behaviour to only occur on clicking table rows

Previously it would react to any selection changed event, which could in
lude time changes (which is done by removing then adding the
ControlPointGroup).

Closes #10590.
This commit is contained in:
Dean Herbert 2020-10-27 12:28:10 +09:00
parent 11ebd2d7f8
commit e1f578c590
2 changed files with 8 additions and 15 deletions

View File

@ -177,6 +177,9 @@ namespace osu.Game.Screens.Edit.Timing
private readonly Box hoveredBackground;
[Resolved]
private EditorClock clock { get; set; }
[Resolved]
private Bindable<ControlPointGroup> selectedGroup { get; set; }
@ -200,7 +203,11 @@ namespace osu.Game.Screens.Edit.Timing
},
};
Action = () => selectedGroup.Value = controlGroup;
Action = () =>
{
selectedGroup.Value = controlGroup;
clock.SeekTo(controlGroup.Time);
};
}
private Color4 colourHover;

View File

@ -22,9 +22,6 @@ namespace osu.Game.Screens.Edit.Timing
[Cached]
private Bindable<ControlPointGroup> selectedGroup = new Bindable<ControlPointGroup>();
[Resolved]
private EditorClock clock { get; set; }
public TimingScreen()
: base(EditorScreenMode.Timing)
{
@ -48,17 +45,6 @@ namespace osu.Game.Screens.Edit.Timing
}
};
protected override void LoadComplete()
{
base.LoadComplete();
selectedGroup.BindValueChanged(selected =>
{
if (selected.NewValue != null)
clock.SeekTo(selected.NewValue.Time);
});
}
protected override void OnTimelineLoaded(TimelineArea timelineArea)
{
base.OnTimelineLoaded(timelineArea);