diff --git a/imgui.cpp b/imgui.cpp index 47c938977..d8e790ea1 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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);