Settings: fixed ConfigIniSettingsAutoDiscardMonths not calling Cleanup (#9460, #9471)

This commit is contained in:
ocornut
2026-07-15 13:57:48 +02:00
parent bad1ee71f8
commit addbfa5021

View File

@@ -15809,7 +15809,10 @@ void ImGui::LoadIniSettingsFromMemory(const char* ini_data, size_t ini_size)
// Call post-read handlers
ImGuiSettingsCleanupArgs cleanup_args;
if (g.IO.ConfigIniSettingsAutoDiscardMonths > 0)
{
cleanup_args.DiscardOlderThanMonths = g.IO.ConfigIniSettingsAutoDiscardMonths;
CleanupIniSettings(&cleanup_args);
}
for (ImGuiSettingsHandler& handler : g.SettingsHandlers)
if (handler.ApplyAllFn != NULL)
handler.ApplyAllFn(&g, &handler);