mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-20 21:35:32 +00:00
Debug Tools: ID Stack Tool: store ResultsComplete and don't display incomplete paths.
This commit is contained in:
@@ -17819,9 +17819,10 @@ void ImGui::UpdateDebugToolStackQueries()
|
||||
if (stack_level >= 0 && stack_level < tool->Results.Size)
|
||||
if (tool->Results[stack_level].QuerySuccess || tool->Results[stack_level].QueryFrameCount > 2)
|
||||
tool->StackLevel++;
|
||||
|
||||
// Update hook
|
||||
stack_level = tool->StackLevel;
|
||||
|
||||
// Update status and hook
|
||||
tool->ResultsComplete = (stack_level == tool->Results.Size);
|
||||
if (stack_level == -1)
|
||||
{
|
||||
g.DebugHookIdInfoId = query_main_id;
|
||||
@@ -17972,7 +17973,7 @@ void ImGui::ShowIDStackToolWindow(bool* p_open)
|
||||
SetClipboardText(result_path);
|
||||
}
|
||||
|
||||
Text("- Path \"%s\"", result_path);
|
||||
Text("- Path \"%s\"", tool->ResultsComplete ? result_path : "");
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
Text("- Label \"%s\"", tool->QueryMainId ? ImGuiTestEngine_FindItemDebugLabel(&g, tool->QueryMainId) : "");
|
||||
#endif
|
||||
|
||||
@@ -2132,9 +2132,10 @@ struct ImGuiStackLevelInfo
|
||||
struct ImGuiIDStackTool
|
||||
{
|
||||
int LastActiveFrame;
|
||||
int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level
|
||||
ImGuiID QueryMainId; // ID to query details for
|
||||
int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level.
|
||||
ImGuiID QueryMainId; // ID to query details for.
|
||||
ImVector<ImGuiStackLevelInfo> Results;
|
||||
bool ResultsComplete; // All sub-query have succeeeded, result is complete.
|
||||
bool QueryHookActive; // Used to disambiguate the case where DebugHookIdInfoId == 0 which is valid.
|
||||
bool OptHexEncodeNonAsciiChars;
|
||||
bool OptCopyToClipboardOnCtrlC;
|
||||
|
||||
Reference in New Issue
Block a user