Skip to content

Commit 86e5b7a

Browse files
committed
[ProjectListItemControl] Fix Wrap Long Project Title
If the project has no tags, tag_container stays empty. This must be taken into account when calculating tag_maxsize.
1 parent 7220d45 commit 86e5b7a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

editor/project_manager/project_list.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,12 @@ void ProjectListItemControl::resize_project_title() {
474474

475475
return;
476476
}
477-
ProjectTag tag = ProjectTag("dummy");
478-
int tag_maxsize = tag.get_custom_maximum_size().x;
477+
478+
int tag_maxsize = 0;
479+
if (tag_size_cache != 0) {
480+
ProjectTag tag = ProjectTag("dummy");
481+
tag_maxsize = tag.get_custom_maximum_size().x;
482+
}
479483
int title_maxsize = title_size_cache - tag_size_cache;
480484
int title_minsize = title_size_cache - tag_maxsize;
481485

0 commit comments

Comments
 (0)