Browse Source

Merge pull request #107834 from BrotherShort/fix-rename-autoloads

Tree: Fix handling of `__focus_rect` with various Select Modes
Rémi Verschelde 1 month ago
parent
commit
d7bdc0be16
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/gui/tree.cpp

+ 1 - 1
scene/gui/tree.cpp

@@ -2370,7 +2370,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
 				}
 			}
 
-			if ((select_mode != SELECT_SINGLE && selected_item == p_item) || p_item->cells[i].selected || !p_item->has_meta("__focus_rect")) {
+			if ((select_mode == SELECT_ROW && selected_item == p_item) || (select_mode == SELECT_MULTI && selected_item == p_item && selected_col == i) || p_item->cells[i].selected || !p_item->has_meta("__focus_rect")) {
 				Rect2i r = cell_rect;
 
 				if (select_mode != SELECT_ROW) {