Fix blueprint container not handling right clicks correctly while moveing an element

This commit is contained in:
Salman Ahmed 2024-01-22 04:39:08 +03:00
parent b588715d21
commit 2bd9cd5d34

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnMouseDown(MouseDownEvent e)
{
bool selectionPerformed = performMouseDownActions(e);
bool movementPossible = prepareSelectionMovement();
bool movementPossible = prepareSelectionMovement(e);
// check if selection has occurred
if (selectionPerformed)
@ -536,9 +536,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// <summary>
/// Attempts to begin the movement of any selected blueprints.
/// </summary>
/// <param name="e">The <see cref="MouseDownEvent"/> defining the beginning of a movement.</param>
/// <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())
return false;