Skip to content

don't update slider direction when dragging note until note direction is changed #576

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
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 @@ -42,6 +42,7 @@ private readonly float

private bool diagonal;
private bool flagDirectionsUpdate;
private bool updateAttachedSliderDirection;

private static readonly int alwaysTranslucent = Shader.PropertyToID("_AlwaysTranslucent");

Expand Down Expand Up @@ -171,6 +172,7 @@ public void UpdateCut(int value)
ToggleDiagonalAngleOffset(DraggedObjectContainer.NoteData, value);
DraggedObjectContainer.NoteData.CutDirection = value;
noteAppearanceSo.SetNoteAppearance(DraggedObjectContainer);
updateAttachedSliderDirection = true;
}
// TODO: This IsActive is a workaround to prevent ghost notes. This happens because bomb placement could be
// dragging a note and quick editing results in issues
Expand Down Expand Up @@ -258,7 +260,7 @@ private void TransferQueuedToAttachedDraggedSliders(BaseNote queued)
baseSlider.SetTimes(queued.JsonTime, queued.SongBpmTime);
baseSlider.PosX = queued.PosX;
baseSlider.PosY = queued.PosY;
baseSlider.CutDirection = queued.CutDirection;
if (updateAttachedSliderDirection) baseSlider.CutDirection = queued.CutDirection;
baseSlider.CustomCoordinate = queued.CustomCoordinate;
}

Expand All @@ -269,7 +271,7 @@ private void TransferQueuedToAttachedDraggedSliders(BaseNote queued)
baseSlider.TailPosY = queued.PosY;
baseSlider.CustomTailCoordinate = queued.CustomCoordinate;

if (baseSlider is BaseArc baseArc)
if (baseSlider is BaseArc baseArc && updateAttachedSliderDirection)
{
baseArc.TailCutDirection = queued.CutDirection;
}
Expand All @@ -280,6 +282,8 @@ private void TransferQueuedToAttachedDraggedSliders(BaseNote queued)
if (baseSliderContainer is ArcContainer arcContainer) arcContainer.NotifySplineChanged();
if (baseSliderContainer is ChainContainer chainContainer) chainContainer.GenerateChain();
}

updateAttachedSliderDirection = false;
}

internal override void RefreshVisuals()
Expand Down