You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add per-scene UndoRedo
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "node_3d_editor_plugin.h"
|
||||
|
||||
Size2 GradientEditor::get_minimum_size() const {
|
||||
@@ -55,7 +56,7 @@ void GradientEditor::_gradient_changed() {
|
||||
|
||||
void GradientEditor::_ramp_changed() {
|
||||
editing = true;
|
||||
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
||||
Ref<EditorUndoRedoManager> undo_redo = EditorNode::get_undo_redo();
|
||||
undo_redo->create_action(TTR("Gradient Edited"), UndoRedo::MERGE_ENDS);
|
||||
undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets());
|
||||
undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors());
|
||||
|
||||
Reference in New Issue
Block a user