Skip to content

Commit d6de172

Browse files
committed
Fixed variables hyphen symbol issue dialogic-godot#1634
1 parent 35d29a3 commit d6de172

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: addons/dialogic/Modules/Variable/variables_editor/variable_field.gd

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ func _on_NameEdit_focus_exited() -> void:
9191

9292
func _on_name_edit_text_submitted(new_text:String) -> void:
9393
%NameEdit.text = new_text.replace(' ', '_')
94+
%NameEdit.text = %NameEdit.text.replace('-', '_')
95+
9496
if %NameEdit.text != previous_name and !actually_new:
9597
if parent_Group.get_group_path().is_empty():
9698
variables_editor.variable_renamed(previous_name, %NameEdit.text)

Diff for: addons/dialogic/Modules/Variable/variables_editor/variable_group.gd

+2
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ func _on_NameEdit_focus_exited() -> void:
289289

290290
func disable_name_edit() -> void:
291291
%NameEdit.text = %NameEdit.text.replace(' ', '_')
292+
%NameEdit.text = %NameEdit.text.replace('-', '_')
293+
292294
if get_group_path() != previous_path and !actually_new:
293295
variables_editor.group_renamed(previous_path, get_group_path(), get_data())
294296
previous_path = get_group_path()

0 commit comments

Comments
 (0)