Skip to content

Fix blueprint container not handling right clicks correctly while moving a blueprint #26661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void load()
protected override bool OnMouseDown(MouseDownEvent e)
{
bool selectionPerformed = performMouseDownActions(e);
bool movementPossible = prepareSelectionMovement();
bool movementPossible = prepareSelectionMovement(e);

// check if selection has occurred
if (selectionPerformed)
Expand Down Expand Up @@ -536,9 +536,13 @@ protected virtual void OnBlueprintDeselected(SelectionBlueprint<T> blueprint)
/// <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;

Expand Down