1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 20:05:29 +08:00

Merge pull request #26661 from frenzibyte/fix-mouse-blueprint

Fix blueprint container not handling right clicks correctly while moving a blueprint
This commit is contained in:
Dean Herbert 2024-01-22 16:53:54 +09:00 committed by GitHub
commit f6fa965252
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnMouseDown(MouseDownEvent e) protected override bool OnMouseDown(MouseDownEvent e)
{ {
bool selectionPerformed = performMouseDownActions(e); bool selectionPerformed = performMouseDownActions(e);
bool movementPossible = prepareSelectionMovement(); bool movementPossible = prepareSelectionMovement(e);
// check if selection has occurred // check if selection has occurred
if (selectionPerformed) if (selectionPerformed)
@ -536,9 +536,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// <summary> /// <summary>
/// Attempts to begin the movement of any selected blueprints. /// Attempts to begin the movement of any selected blueprints.
/// </summary> /// </summary>
/// <param name="e">The <see cref="MouseDownEvent"/> defining the beginning of a movement.</param>
/// <returns>Whether a movement is possible.</returns> /// <returns>Whether a movement is possible.</returns>
private bool prepareSelectionMovement() private bool prepareSelectionMovement(MouseDownEvent e)
{ {
if (e.Button == MouseButton.Right)
return false;
if (!SelectionHandler.SelectedBlueprints.Any()) if (!SelectionHandler.SelectedBlueprints.Any())
return false; return false;