mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 22:21:18 +00:00
Add per-scene UndoRedo
This commit is contained in:
parent
99548e521d
commit
ece3df3938
122 changed files with 1498 additions and 642 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue