summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-05-24 13:37:47 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-05-24 13:50:10 +0300
commit6772f70ec3473edb3e91f122dd82e63d378b195a (patch)
tree1272759c309c91e55900d2db6b533dd035387ddc
parent08491ec5432577dffcaccda161df4cca8c141c30 (diff)
Fixes adding nodes on dragging in visual shaders
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 72b19a9074..8be55296d9 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -3323,6 +3323,8 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
saved_node_pos_dirty = true;
_add_node(idx, add_options[idx].sub_func);
} else if (d.has("files")) {
+ undo_redo->create_action(TTR("Add Node(s) to Visual Shader"));
+
if (d["files"].get_type() == Variant::PACKED_STRING_ARRAY) {
PackedStringArray arr = d["files"];
for (int i = 0; i < arr.size(); i++) {
@@ -3370,6 +3372,7 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
}
}
+ undo_redo->commit_action();
}
}
}