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

Pass on mouseDown input to timeline if no selection modification is made with that input

This commit is contained in:
Derrick Timmermans 2021-07-16 17:21:43 +02:00
parent 3e8a13bfbf
commit e35cff99c7
No known key found for this signature in database
GPG Key ID: 8681B60806EF4A17

View File

@ -97,6 +97,19 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
protected override Container<SelectionBlueprint<HitObject>> CreateSelectionBlueprintContainer() => new TimelineSelectionBlueprintContainer { RelativeSizeAxes = Axes.Both };
protected override bool OnMouseDown(MouseDownEvent e)
{
int selectionCount = SelectedItems.Count;
// We let BlueprintContainer attempt a HitObject selection
// If it fails, we'll pass it this input back to the timeline so it can be dragged
// We know it failed if the selection count is unchanged after the selection attempt
if (base.OnMouseDown(e) && selectionCount != SelectedItems.Count)
return true;
return false;
}
protected override bool OnDragStart(DragStartEvent e)
{
if (!shouldHandleInputAt(e.ScreenSpaceMouseDownPosition))