diff --git a/imgui.cpp b/imgui.cpp index df9a826c3..441f62b0a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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 diff --git a/imgui_internal.h b/imgui_internal.h index 283215295..fcd02f280 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -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 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;