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

Amend 0e769c5
This commit is contained in:
ocornut
2025-08-07 16:16:12 +02:00
parent 284283615b
commit 1bf41a0762
2 changed files with 6 additions and 1 deletions

View File

@@ -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]

View File

@@ -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;