summaryrefslogtreecommitdiffstats
path: root/editor/plugins/visual_shader_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 5cae151531..5c22e454ab 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -4826,16 +4826,14 @@ void VisualShaderEditor::_varying_create() {
add_varying_dialog->hide();
}
-void VisualShaderEditor::_varying_name_changed(const String &p_text) {
- String name = p_text;
-
- if (!name.is_valid_identifier()) {
+void VisualShaderEditor::_varying_name_changed(const String &p_name) {
+ if (!p_name.is_valid_identifier()) {
varying_error_label->show();
varying_error_label->set_text(TTR("Invalid name for varying."));
add_varying_dialog->get_ok_button()->set_disabled(true);
return;
}
- if (visual_shader->has_varying(name)) {
+ if (visual_shader->has_varying(p_name)) {
varying_error_label->show();
varying_error_label->set_text(TTR("Varying with that name is already exist."));
add_varying_dialog->get_ok_button()->set_disabled(true);