Internals: fixed ImPool:: iteration, rename GetBufSize to GetMapSize. Amend c6c82b9f

This commit is contained in:
ocornut
2021-06-04 17:21:59 +02:00
parent c6c82b9f1d
commit 94b680e830
4 changed files with 21 additions and 20 deletions

View File

@ -3298,8 +3298,8 @@ void ImGui::TableLoadSettings(ImGuiTable* table)
static void TableSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
{
ImGuiContext& g = *ctx;
for (int i = 0; i != g.Tables.GetBufSize(); i++)
if (ImGuiTable* table = g.Tables.TryGetBufData(i))
for (int i = 0; i != g.Tables.GetMapSize(); i++)
if (ImGuiTable* table = g.Tables.TryGetMapData(i))
table->SettingsOffset = -1;
g.SettingsTables.clear();
}
@ -3308,8 +3308,8 @@ static void TableSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandle
static void TableSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
{
ImGuiContext& g = *ctx;
for (int i = 0; i != g.Tables.GetBufSize(); i++)
if (ImGuiTable* table = g.Tables.TryGetBufData(i))
for (int i = 0; i != g.Tables.GetMapSize(); i++)
if (ImGuiTable* table = g.Tables.TryGetMapData(i))
{
table->IsSettingsRequestLoad = true;
table->SettingsOffset = -1;