Tables: do not show empty tooltip when user submits TableHeader with no label to display. (#6342)

This commit is contained in:
lukaasm
2023-04-17 23:02:36 +02:00
committed by ocornut
parent f94a8344f6
commit e49d31a1c9
2 changed files with 3 additions and 1 deletions

View File

@ -3007,7 +3007,7 @@ void ImGui::TableHeader(const char* label)
}
// Sort order arrow
const float ellipsis_max = cell_r.Max.x - w_arrow - w_sort_text;
const float ellipsis_max = ImMax(cell_r.Max.x - w_arrow - w_sort_text, label_pos.x);
if ((table->Flags & ImGuiTableFlags_Sortable) && !(column->Flags & ImGuiTableColumnFlags_NoSort))
{
if (column->SortOrder != -1)