Browse Source

Merge pull request #62781 from MinusKube/tree-slider-bug

Fix range slider in tree not updating text value
Rémi Verschelde 3 years ago
parent
commit
207ef8a33d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      scene/gui/tree.cpp

+ 3 - 0
scene/gui/tree.cpp

@@ -2815,6 +2815,9 @@ void Tree::value_editor_changed(double p_value) {
 
 
 	TreeItem::Cell &c = popup_edited_item->cells.write[popup_edited_item_col];
 	TreeItem::Cell &c = popup_edited_item->cells.write[popup_edited_item_col];
 	c.val = p_value;
 	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);
 	item_edited(popup_edited_item_col, popup_edited_item);
 	update();
 	update();
 }
 }