1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Implement undo-redo feature for Parameter Paste in the Inspector

EditorData::undo_redo.add_do_property and EditorData::undo_redo.add_undo_property is used in EditorData::paste_object_params to implement this feature. It's action name is set to "Paste Params"

Changes made
* Removed the call for clearing the history on paste params case.
* Instead of directly setting the properties value, EditorData::undo_redo is used.

(cherry picked from commit f817ba8379)
This commit is contained in:
simpuid
2020-02-29 08:55:28 +05:30
committed by Rémi Verschelde
parent 867ea694da
commit 621c20db90
2 changed files with 6 additions and 3 deletions

View File

@@ -76,7 +76,6 @@ void InspectorDock::_menu_option(int p_option) {
editor_data->apply_changes_in_editors();
if (current)
editor_data->paste_object_params(current);
editor_data->get_undo_redo().clear_history();
} break;
case OBJECT_UNIQUE_RESOURCES: {