From 1bf41a076229739ac845b7ffc613511f0208398a Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 7 Aug 2025 16:16:12 +0200 Subject: [PATCH] Fonts, Tables: fixed PushFont() having no effect when called after submitting a hidden column. (#8865) Amend 0e769c5 --- docs/CHANGELOG.txt | 2 ++ imgui.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 049007155..88dbf2fc7 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -122,6 +122,8 @@ Changes: to pass full range of information into e.g. FreeType's face_index, as higher bits are used from FreeType 2.6.1. (#8775) [@Valakor] (the field has been erroneously reduced from 32-bits to 8-bit in 1.92.0) +- Fonts, Tables: fixed PushFont() having no effect when called after submitting + a hidden column. (#8865) - Textures: Fixed support for `#define ImTextureID_Invalid` to non-zero value: ImTextureData() was incorrectly cleared with zeroes. (#8745) [@rachit7645] - Demo: Added "Text -> Font Size" demo section. (#8738) [@Demonese] diff --git a/imgui.cpp b/imgui.cpp index 308733d17..d2b600595 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8841,8 +8841,11 @@ void ImGui::UpdateCurrentFontSize(float restore_font_size_after_scaling) // However this would leave a pretty subtle and damning error surface area if g.FontBaked was mismatching, so for now we null it. // FIXME: perhaps g.FontSize should be updated? if (window != NULL && window->SkipItems) - if (g.CurrentTable == NULL || g.CurrentTable->CurrentColumn != -1) // See 8465#issuecomment-2951509561. Ideally the SkipItems=true in tables would be amended with extra data. + { + ImGuiTable* table = g.CurrentTable; + if (table == NULL || (table->CurrentColumn != -1 && table->Columns[table->CurrentColumn].IsSkipItems == false)) // See 8465#issuecomment-2951509561 and #8865. Ideally the SkipItems=true in tables would be amended with extra data. return; + } // Restoring is pretty much only used by PopFont() float final_size = (restore_font_size_after_scaling > 0.0f) ? restore_font_size_after_scaling : 0.0f;