Просмотр исходного кода

fix deadzone slider not working correctly

kerstop 1 год назад
Родитель
Сommit
2fd39eca30
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      scene/gui/tree.cpp

+ 2 - 4
scene/gui/tree.cpp

@@ -3272,12 +3272,10 @@ void Tree::value_editor_changed(double p_value) {
 		return;
 	}
 
-	TreeItem::Cell &c = popup_edited_item->cells.write[popup_edited_item_col];
-	c.val = p_value;
+	const TreeItem::Cell &c = popup_edited_item->cells[popup_edited_item_col];
 
-	line_editor->set_text(String::num(c.val, Math::range_step_decimals(c.step)));
+	line_editor->set_text(String::num(p_value, Math::range_step_decimals(c.step)));
 
-	item_edited(popup_edited_item_col, popup_edited_item);
 	queue_redraw();
 }