summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-30 14:58:33 +0200
committerGitHub <noreply@github.com>2019-04-30 14:58:33 +0200
commit9dc9434b1bcde48259fa68066a7a3e2cff5d5eab (patch)
tree10e597c0df84b6eb358e56a408800440535b12ce /scene/gui
parentc991379b81e660e6c9d28620d61b87e9c0cb5233 (diff)
parentca1935d6f776a789dda9e046e5624ba0715e2671 (diff)
Merge pull request #24437 from mateusfccp/single_quotes_option
Add settings for single-quotes on completion
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index c7cd2bb6d8..a38f97a90c 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2634,6 +2634,12 @@ bool Control::is_visibility_clip_disabled() const {
void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
+#ifdef TOOLS_ENABLED
+ const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
+#else
+ const String quote_style = "\"";
+#endif
+
Node::get_argument_options(p_function, p_idx, r_options);
if (p_idx == 0) {
@@ -2651,7 +2657,7 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List
sn.sort_custom<StringName::AlphCompare>();
for (List<StringName>::Element *E = sn.front(); E; E = E->next()) {
- r_options->push_back("\"" + E->get() + "\"");
+ r_options->push_back(quote_style + E->get() + quote_style);
}
}
}