mirror of
https://github.com/godotengine/godot-visual-script.git
synced 2026-01-04 18:10:07 +03:00
Add per-scene UndoRedo
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
#include "editor/editor_resource_preview.h"
|
#include "editor/editor_resource_preview.h"
|
||||||
#include "editor/editor_scale.h"
|
#include "editor/editor_scale.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
|
#include "editor/editor_undo_redo_manager.h"
|
||||||
#include "scene/gui/check_button.h"
|
#include "scene/gui/check_button.h"
|
||||||
#include "scene/gui/graph_edit.h"
|
#include "scene/gui/graph_edit.h"
|
||||||
#include "scene/gui/separator.h"
|
#include "scene/gui/separator.h"
|
||||||
@@ -74,7 +75,7 @@ class VisualScriptEditorSignalEdit : public Object {
|
|||||||
StringName sig;
|
StringName sig;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UndoRedo *undo_redo;
|
Ref<EditorUndoRedoManager> undo_redo;
|
||||||
Ref<VisualScript> script;
|
Ref<VisualScript> script;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -197,8 +198,6 @@ public:
|
|||||||
sig = p_sig;
|
sig = p_sig;
|
||||||
notify_property_list_changed();
|
notify_property_list_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
VisualScriptEditorSignalEdit() { undo_redo = nullptr; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VisualScriptEditorVariableEdit : public Object {
|
class VisualScriptEditorVariableEdit : public Object {
|
||||||
@@ -207,7 +206,7 @@ class VisualScriptEditorVariableEdit : public Object {
|
|||||||
StringName var;
|
StringName var;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UndoRedo *undo_redo;
|
Ref<EditorUndoRedoManager> undo_redo;
|
||||||
Ref<VisualScript> script;
|
Ref<VisualScript> script;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -355,8 +354,6 @@ public:
|
|||||||
var = p_var;
|
var = p_var;
|
||||||
notify_property_list_changed();
|
notify_property_list_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
VisualScriptEditorVariableEdit() { undo_redo = nullptr; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
|
static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
class GraphEdit;
|
class GraphEdit;
|
||||||
|
|
||||||
|
class EditorUndoRedoManager;
|
||||||
class VisualScriptEditorSignalEdit;
|
class VisualScriptEditorSignalEdit;
|
||||||
class VisualScriptEditorVariableEdit;
|
class VisualScriptEditorVariableEdit;
|
||||||
|
|
||||||
@@ -135,8 +136,7 @@ class VisualScriptEditor : public ScriptEditorBase {
|
|||||||
EditorProperty *default_property_editor = nullptr;
|
EditorProperty *default_property_editor = nullptr;
|
||||||
Ref<VisualScriptEditedProperty> edited_default_property_holder;
|
Ref<VisualScriptEditedProperty> edited_default_property_holder;
|
||||||
|
|
||||||
UndoRedo *undo_redo = nullptr;
|
Ref<EditorUndoRedoManager> undo_redo;
|
||||||
|
|
||||||
Tree *members = nullptr;
|
Tree *members = nullptr;
|
||||||
AcceptDialog *function_name_edit = nullptr;
|
AcceptDialog *function_name_edit = nullptr;
|
||||||
LineEdit *function_name_box = nullptr;
|
LineEdit *function_name_box = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user