1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Log/Capture: reworked scope + decorating menus, tabs.

This commit is contained in:
ocornut 2024-10-30 15:10:35 +01:00
parent a4fcc93f4a
commit f37a9a27e5
4 changed files with 10 additions and 1 deletions

View file

@ -4008,6 +4008,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
LogEnabled = false;
LogFlags = ImGuiLogFlags_None;
LogWindow = NULL;
LogNextPrefix = LogNextSuffix = NULL;
LogFile = NULL;
LogLinePosY = FLT_MAX;
@ -7748,7 +7749,7 @@ void ImGui::End()
}
// Stop logging
if (!(window->Flags & ImGuiWindowFlags_ChildWindow)) // FIXME: add more options for scope of logging
if (g.LogWindow == window) // FIXME: add more options for scope of logging
LogFinish();
if (window->DC.IsSetPos)
@ -14334,6 +14335,7 @@ void ImGui::LogBegin(ImGuiLogFlags flags, int auto_open_depth)
g.LogEnabled = g.ItemUnclipByLog = true;
g.LogFlags = flags;
g.LogWindow = window;
g.LogNextPrefix = g.LogNextSuffix = NULL;
g.LogDepthRef = window->DC.TreeDepth;
g.LogDepthToExpand = ((auto_open_depth >= 0) ? auto_open_depth : g.LogDepthToExpandDefault);