1
0
Fork 0

Change: Don't measure group name widths in company livery window. (#14291)

Measuring the name width did not also take account of indentation levels so didn't prevent cropping, and the window can be resized anyway.

This avoids a potential bottleneck due to layouting group names if there are a lot of groups present.
pull/14293/head
Peter Nelson 2025-05-22 22:57:50 +01:00 committed by GitHub
parent 5fef32bde7
commit 1064309ecf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 7 deletions

View File

@ -750,13 +750,6 @@ public:
d = maxdim(d, GetStringBoundingBox(STR_LIVERY_DEFAULT + scheme));
}
/* And group names */
for (const Group *g : Group::Iterate()) {
if (g->owner == this->window_number) {
d = maxdim(d, GetStringBoundingBox(GetString(STR_GROUP_NAME, g->index)));
}
}
size.width = std::max(size.width, 5 + d.width + padding.width);
break;
}