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.
2 parents d364dac + 5a8c3bb commit e8535bcCopy full SHA for e8535bc
scene/gui/tree.cpp
@@ -6404,14 +6404,15 @@ String Tree::get_tooltip(const Point2 &p_pos) const {
6404
// Walk forwards until we know which column we're in.
6405
int next_edge = 0;
6406
int i = 0;
6407
- for (; i < columns.size(); i++) {
+ for (const ColumnInfo &column : columns) {
6408
+ next_edge += get_column_width(i++);
6409
+
6410
if (pos_x < next_edge) {
6411
+ if (!column.title_tooltip.is_empty()) {
6412
+ return column.title_tooltip;
6413
+ }
6414
break;
6415
}
- next_edge += get_column_width(i);
- }
- if (!columns[i - 1].title_tooltip.is_empty()) {
- return columns[i - 1].title_tooltip;
6416
6417
6418
// If the column has no tooltip, use the default.
0 commit comments