浏览代码

Fonts, Tables: fixed PushFont() having no effect when called after submitting a hidden column. (#8865)

Amend 0e769c5
ocornut 1 月之前
父节点
当前提交
1bf41a0762
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 2 0
      docs/CHANGELOG.txt
  2. 4 1
      imgui.cpp

+ 2 - 0
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]

+ 4 - 1
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;