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:
parent
11ebd2d7f8
commit
e1f578c590
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user