mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Add test coverage and fix fail case where a drag selection ends incorrectly with cyclic selection
This commit is contained in:
@ -178,6 +178,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
endClickSelection(e);
|
||||
clickSelectionHandled = false;
|
||||
isDraggingBlueprint = false;
|
||||
wasDragStarted = false;
|
||||
});
|
||||
|
||||
finishSelectionMovement();
|
||||
@ -191,6 +192,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
return false;
|
||||
|
||||
lastDragEvent = e;
|
||||
wasDragStarted = true;
|
||||
|
||||
if (movementBlueprints != null)
|
||||
{
|
||||
@ -399,7 +401,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
return false;
|
||||
}
|
||||
|
||||
if (selectedBlueprintAlreadySelectedOnMouseDown && AllowCyclicSelection)
|
||||
if (!wasDragStarted && selectedBlueprintAlreadySelectedOnMouseDown && AllowCyclicSelection)
|
||||
{
|
||||
// If a click occurred and was handled by the currently selected blueprint but didn't result in a drag,
|
||||
// cycle between other blueprints which are also under the cursor.
|
||||
@ -485,6 +487,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// </summary>
|
||||
private bool isDraggingBlueprint;
|
||||
|
||||
/// <summary>
|
||||
/// Whether a drag operation was started at all.
|
||||
/// </summary>
|
||||
private bool wasDragStarted;
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to begin the movement of any selected blueprints.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user