mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-05 04:10:07 +00:00
Internals: fixed iterating ImPool, fix after use of TableRemove() (was only used by TestEngine)
Merge metrics bits from 646c87359
This commit is contained in:
parent
a640d8a6d2
commit
c6c82b9f1d
4 changed files with 43 additions and 27 deletions
|
|
@ -3298,8 +3298,9 @@ void ImGui::TableLoadSettings(ImGuiTable* table)
|
|||
static void TableSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
|
||||
{
|
||||
ImGuiContext& g = *ctx;
|
||||
for (int i = 0; i != g.Tables.GetSize(); i++)
|
||||
g.Tables.GetByIndex(i)->SettingsOffset = -1;
|
||||
for (int i = 0; i != g.Tables.GetBufSize(); i++)
|
||||
if (ImGuiTable* table = g.Tables.TryGetBufData(i))
|
||||
table->SettingsOffset = -1;
|
||||
g.SettingsTables.clear();
|
||||
}
|
||||
|
||||
|
|
@ -3307,12 +3308,12 @@ static void TableSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandle
|
|||
static void TableSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
|
||||
{
|
||||
ImGuiContext& g = *ctx;
|
||||
for (int i = 0; i != g.Tables.GetSize(); i++)
|
||||
{
|
||||
ImGuiTable* table = g.Tables.GetByIndex(i);
|
||||
table->IsSettingsRequestLoad = true;
|
||||
table->SettingsOffset = -1;
|
||||
}
|
||||
for (int i = 0; i != g.Tables.GetBufSize(); i++)
|
||||
if (ImGuiTable* table = g.Tables.TryGetBufData(i))
|
||||
{
|
||||
table->IsSettingsRequestLoad = true;
|
||||
table->SettingsOffset = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static void* TableSettingsHandler_ReadOpen(ImGuiContext*, ImGuiSettingsHandler*, const char* name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue