1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 11:52:56 +08:00

Merge pull request #10767 from peppy/fix-editor-crash-on-two-mouse-button-click

Fix BlueprintContainer triggering assert when left and right mouse button are pressed together
This commit is contained in:
Dan Balasescu 2020-11-10 18:41:58 +09:00 committed by GitHub
commit ef1036cef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,21 +295,15 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// <returns>Whether a selection was performed.</returns> /// <returns>Whether a selection was performed.</returns>
private bool beginClickSelection(MouseButtonEvent e) private bool beginClickSelection(MouseButtonEvent e)
{ {
Debug.Assert(!clickSelectionBegan);
bool selectedPerformed = true;
foreach (SelectionBlueprint blueprint in SelectionBlueprints.AliveChildren) foreach (SelectionBlueprint blueprint in SelectionBlueprints.AliveChildren)
{ {
if (blueprint.IsHovered) if (!blueprint.IsHovered) continue;
{
selectedPerformed &= SelectionHandler.HandleSelectionRequested(blueprint, e); if (SelectionHandler.HandleSelectionRequested(blueprint, e))
clickSelectionBegan = true; return clickSelectionBegan = true;
break;
}
} }
return selectedPerformed; return false;
} }
/// <summary> /// <summary>