We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06827c9 commit 5a8c3bbCopy full SHA for 5a8c3bb
scene/gui/tree.cpp
@@ -6403,14 +6403,15 @@ String Tree::get_tooltip(const Point2 &p_pos) const {
6403
// Walk forwards until we know which column we're in.
6404
int next_edge = 0;
6405
int i = 0;
6406
- for (; i < columns.size(); i++) {
+ for (const ColumnInfo &column : columns) {
6407
+ next_edge += get_column_width(i++);
6408
+
6409
if (pos_x < next_edge) {
6410
+ if (!column.title_tooltip.is_empty()) {
6411
+ return column.title_tooltip;
6412
+ }
6413
break;
6414
}
- next_edge += get_column_width(i);
- }
- if (!columns[i - 1].title_tooltip.is_empty()) {
- return columns[i - 1].title_tooltip;
6415
6416
6417
// If the column has no tooltip, use the default.
0 commit comments