mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Debug Tools: ID Stack Tool: preserve first data type, so user of PushOverrideID() e.g. TreeNode() elements don't get demoted from _String to _ID.
This commit is contained in:
parent
e3979c2098
commit
873fe34b31
2 changed files with 3 additions and 2 deletions
|
|
@ -17892,7 +17892,8 @@ void ImGui::DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* dat
|
||||||
tool->ResultPathsBuf.append(result, result_end + 1); // Include zero terminator
|
tool->ResultPathsBuf.append(result, result_end + 1); // Include zero terminator
|
||||||
}
|
}
|
||||||
info->QuerySuccess = true;
|
info->QuerySuccess = true;
|
||||||
info->DataType = (ImS8)data_type;
|
if (info->DataType == -1)
|
||||||
|
info->DataType = (ImS8)data_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int StackToolFormatLevelInfo(ImGuiIDStackTool* tool, int n, bool format_for_ui, char* buf, size_t buf_size)
|
static int StackToolFormatLevelInfo(ImGuiIDStackTool* tool, int n, bool format_for_ui, char* buf, size_t buf_size)
|
||||||
|
|
|
||||||
|
|
@ -2125,7 +2125,7 @@ struct ImGuiStackLevelInfo
|
||||||
ImS8 DataType; // ImGuiDataType
|
ImS8 DataType; // ImGuiDataType
|
||||||
int DescOffset; // -1 or offset into parent's ResultPathsBuf
|
int DescOffset; // -1 or offset into parent's ResultPathsBuf
|
||||||
|
|
||||||
ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); DescOffset = -1; }
|
ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); DataType = -1; DescOffset = -1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// State for ID Stack tool queries
|
// State for ID Stack tool queries
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue