summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinusKube <minuskube@gmail.com>2022-07-06 17:36:30 +0200
committerMinusKube <minuskube@gmail.com>2022-07-06 17:43:16 +0200
commited68f867fb87485f8b92b19206b7b9efc90e452d (patch)
tree7942662a008991f70a3c06db48d7e833ba4dcddc
parentcf194847468e00de682074a14b2cf4ccf7b69188 (diff)
Fix range slider in tree not updating text value
-rw-r--r--scene/gui/tree.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index d3e7540790..f53e98fb28 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2850,6 +2850,9 @@ void Tree::value_editor_changed(double p_value) {
TreeItem::Cell &c = popup_edited_item->cells.write[popup_edited_item_col];
c.val = p_value;
+
+ text_editor->set_text(String::num(c.val, Math::range_step_decimals(c.step)));
+
item_edited(popup_edited_item_col, popup_edited_item);
update();
}