Browse Source

Merge pull request #103168 from Giganzo/tree-edge-hover

Fix Tree hover position with multiple columns
Rémi Verschelde 5 months ago
parent
commit
c4731e1d5b
1 changed files with 6 additions and 7 deletions
  1. 6 7
      scene/gui/tree.cpp

+ 6 - 7
scene/gui/tree.cpp

@@ -5487,15 +5487,14 @@ Tree::FindColumnButtonResult Tree::_find_column_and_button_at_pos(int p_x, const
 			}
 		}
 
-		if (x > col_width) {
-			col_ofs += col_width;
-			x -= col_width;
-			limit_w -= col_width;
-			continue;
+		if (x < col_width) {
+			col = i;
+			break;
 		}
 
-		col = i;
-		break;
+		col_ofs += col_width;
+		x -= col_width;
+		limit_w -= col_width;
 	}
 
 	if (col >= 0) {