Add per-scene UndoRedo
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/editor_spin_slider.h"
|
||||
|
||||
class EditorUndoRedoManager;
|
||||
|
||||
class GradientTexture2DEditorRect : public Control {
|
||||
GDCLASS(GradientTexture2DEditorRect, Control);
|
||||
|
||||
@@ -44,7 +46,7 @@ class GradientTexture2DEditorRect : public Control {
|
||||
};
|
||||
|
||||
Ref<GradientTexture2D> texture;
|
||||
UndoRedo *undo_redo = nullptr;
|
||||
Ref<EditorUndoRedoManager> undo_redo;
|
||||
bool snap_enabled = false;
|
||||
float snap_size = 0;
|
||||
|
||||
@@ -74,7 +76,7 @@ class GradientTexture2DEditor : public VBoxContainer {
|
||||
GDCLASS(GradientTexture2DEditor, VBoxContainer);
|
||||
|
||||
Ref<GradientTexture2D> texture;
|
||||
UndoRedo *undo_redo = nullptr;
|
||||
Ref<EditorUndoRedoManager> undo_redo;
|
||||
|
||||
Button *reverse_button = nullptr;
|
||||
Button *snap_button = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user