Skip to content

Remove redundant Update call in PartsCanvasPointerReleased - #2439

Merged
stakira merged 1 commit into
masterfrom
fix-part-move-release-update
Sep 24, 2026
Merged

stakira merged 1 commit into
masterfrom
fix-part-move-release-update

Conversation

@stakira

@stakira stakira commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Cleaner alternative to #2409 (fixes the same click track drift).

PartsCanvasPointerReleased called partEditState.Update() with the release point right before End(). Every edit state already gets Update on press and on every pointer move, so the release point only differs from the last processed point when no move events fired (e.g. a touch tap that slips a few pixels) — exactly the case where applying it moves the part without the user dragging.

Behavior notes:

  • For a click without movement the removed call is a pure duplicate of the one made on press.
  • For a drag, the final position now comes from the last PointerMoved instead of the release point; any remainder is sub-grid (positions are quantized to ticks).
  • No state keeps flags in Update that End reads, undo grouping is unaffected, and the final PartsSelectionEvent still fires from CommitTempSelectParts in End.

Every edit state already receives Update on press and on every
pointer move; the release point only ever differs from the last
move point when no move events fired (e.g. a touch tap that slips
a few pixels), in which case applying it moves the part without
the user dragging it. The final state is committed in End.
@stakira
stakira requested review from a team and a lite review from Copilot September 24, 2026 04:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Preserve the final PartPanningState update to avoid visible panning shortfalls.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Removes a redundant release-time update to prevent click/tap part-position drift.

Changes:

  • Removes the extra Update call before End.
  • Preserves edit finalization through End.
File Review
OpenUtau/​Views/​MainWindow.axaml.cs Moderate issue (2 votes): retain a final Update for PartPanningState to prevent incomplete middle-button panning.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread OpenUtau/Views/MainWindow.axaml.cs
@stakira
stakira merged commit e7b65e5 into master Sep 24, 2026
4 checks passed
@stakira
stakira deleted the fix-part-move-release-update branch September 24, 2026 05:47
keirokeer added a commit to keirokeer/OpenUtau-lunai that referenced this pull request Sep 25, 2026
openutau#2433 openutau#2439 openutau#2440)

SupportsPhonemeEnvelope on DiffSinger/Enunu/Voicevox; welcome-page hotkey split; drop redundant part Update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants