Skip to content
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

Fix undo action names for node replacement #89121

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Mar 3, 2024

When using conversion plugins, like CPUParticles -> GPUParticles or Sprite2D -> Polygon2D, there is a specially named undo action, but what instead shows is generic "Change type of node(s)". It's caused by EditorUndoRedoManager quirk, which makes it not create action until first operation if there is no undo context, but since replace_node() creates its own action, the nesting doesn't happen and wrong action is used as base (while the original one is committed empty). The fix is to assign correct context when creating undo action, which this PR does.

Before:
image

After:
image

@KoBeWi KoBeWi added this to the 4.3 milestone Mar 3, 2024
@KoBeWi KoBeWi requested review from a team as code owners March 3, 2024 18:16
@akien-mga akien-mga merged commit 95085cd into godotengine:master Mar 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the replace_node_type branch March 4, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants