Skip to content

Make List + add a single undo step without rid alias#70

Merged
VPDPersonal merged 1 commit into
feature/serialize-reference-dropdownfrom
fix/sr-list-add-single-undo
Jun 23, 2026
Merged

Make List + add a single undo step without rid alias#70
VPDPersonal merged 1 commit into
feature/serialize-reference-dropdownfrom
fix/sr-list-add-single-undo

Conversation

@VPDPersonal

Copy link
Copy Markdown
Owner

Summary

  • Make the picker-backed + add on a List<[SerializeReference]> a single Undo step by growing the array and assigning the fresh instance before one ApplyModifiedProperties(), instead of applying twice.
  • This also overwrites the rid copied from the previous last element by arraySize++ within the same modification, so no rid-aliased duplicate is left behind.

Notes for review

  • Dropped the intermediate ApplyModifiedProperties()/Update(); SetManagedReferenceAndApply is now SetManagedReference plus the single trailing apply. One Ctrl+Z now reverts the whole add, matching native add semantics.

Linked issues

Refs #49 - addresses review finding #49 (comment)

@VPDPersonal VPDPersonal added type: fix Bug fix status: needs-review Ready for review area: editor Editor-only code labels Jun 21, 2026
@VPDPersonal VPDPersonal merged commit 099e176 into feature/serialize-reference-dropdown Jun 23, 2026
1 check passed
@VPDPersonal VPDPersonal deleted the fix/sr-list-add-single-undo branch June 23, 2026 14:04
@github-actions github-actions Bot removed the status: needs-review Ready for review label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: editor Editor-only code type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant