summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-14 18:50:19 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-14 18:50:19 +0200
commitdb216e1fe54b24434e6d7addbd00ddf0d5a88818 (patch)
tree36de5d5c8b88198d86e5010b627b6aff21e72165
parent7b0f8d76ada911ee8694a10327c43698590e96e8 (diff)
parentde83b7166c280f92fd576622848ffbea22514fc4 (diff)
downloadredot-engine-db216e1fe54b24434e6d7addbd00ddf0d5a88818.tar.gz
Merge pull request #79457 from timothyqiu/flag-value
Hide explicitly specified flag value in Inspector
-rw-r--r--editor/editor_properties.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 875351cacd..77d6ec9ab2 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -772,7 +772,7 @@ void EditorPropertyFlags::setup(const Vector<String> &p_options) {
const int flag_index = flags.size(); // Index of the next element (added by the code below).
// Value for a flag can be explicitly overridden.
- Vector<String> text_split = p_options[i].split(":");
+ Vector<String> text_split = option.split(":");
if (text_split.size() != 1) {
current_val = text_split[1].to_int();
} else {
@@ -782,7 +782,7 @@ void EditorPropertyFlags::setup(const Vector<String> &p_options) {
// Create a CheckBox for the current flag.
CheckBox *cb = memnew(CheckBox);
- cb->set_text(option);
+ cb->set_text(text_split[0]);
cb->set_clip_text(true);
cb->connect("pressed", callable_mp(this, &EditorPropertyFlags::_flag_toggled).bind(flag_index));
add_focusable(cb);