diff options
author | Robbie Cooper <cooperra@users.noreply.github.com> | 2022-10-15 15:38:19 -0400 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-15 16:03:30 +0100 |
commit | 907ba0d8f284576d81da9b53c4e85697c5b9ed8f (patch) | |
tree | 2f502653555b2009ce1a7fd117b065f303728e76 /modules/gdscript/gdscript_vm.cpp | |
parent | 5dd52f47b197882805c2cf5edea0b7cfdebee792 (diff) | |
download | redot-engine-907ba0d8f284576d81da9b53c4e85697c5b9ed8f.tar.gz |
Have the Rename Node action use the targeted Node to determine the current undo/redo context
Formerly, we deduced context implicitly, but this failed and always used the global context instead of the context of the scene containing the Node.
This happened because the first argument to `add_do_method`, the SceneTreeEditor, is a descendant of Node and outside the current game scene's tree (it's part of the editor instead). This led the code in `EditorUndoRedoManager::get_history_id_for_object` to choose global context.
My solution is to explicitly use the renamed Node to deduce our context because it will always be in the current scene in this situation.
Fixes #67276
Diffstat (limited to 'modules/gdscript/gdscript_vm.cpp')
0 files changed, 0 insertions, 0 deletions