summaryrefslogtreecommitdiffstats
path: root/editor/project_settings_editor.cpp
diff options
context:
space:
mode:
authorrobfram <robfram@gmail.com>2018-03-12 21:28:41 +0100
committerrobfram <robfram@gmail.com>2018-03-12 21:28:41 +0100
commitea94a8259624a1915fa4b92682755e28f2bb6af5 (patch)
tree8e64a11a63692f3fb0009a749a23f13cb737c055 /editor/project_settings_editor.cpp
parenteceba5aa6a36521c878cf976845123e820d27161 (diff)
downloadredot-engine-ea94a8259624a1915fa4b92682755e28f2bb6af5.tar.gz
Fix non working action names containing whitespaces
Now the action name is quoted if it contains spaces. Also, quotation mark (") is added to the forbidden character list for action names, as it was also a bug. Fix #17322
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r--editor/project_settings_editor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 9625bc19c0..096d9c1a90 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -137,12 +137,12 @@ void ProjectSettingsEditor::_action_edited() {
if (new_name == old_name)
return;
- if (new_name.find("/") != -1 || new_name.find(":") != -1 || new_name == "") {
+ if (new_name.find("/") != -1 || new_name.find(":") != -1 || new_name.find("\"") != -1 || new_name == "") {
ti->set_text(0, old_name);
add_at = "input/" + old_name;
- message->set_text(TTR("Invalid action (anything goes but '/' or ':')."));
+ message->set_text(TTR("Invalid action (anything goes but '/', ':' or '\"')."));
message->popup_centered(Size2(300, 100) * EDSCALE);
return;
}
@@ -830,9 +830,9 @@ void ProjectSettingsEditor::_action_check(String p_action) {
action_add->set_disabled(true);
} else {
- if (p_action.find("/") != -1 || p_action.find(":") != -1) {
+ if (p_action.find("/") != -1 || p_action.find(":") != -1 || p_action.find("\"") != -1) {
- action_add_error->set_text(TTR("Can't contain '/' or ':'"));
+ action_add_error->set_text(TTR("Can't contain '/', ':' or '\"'"));
action_add_error->show();
action_add->set_disabled(true);
return;