mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-26 14:51:46 +01:00
End() avoid calling Columns() if no columns set is open, not sure what it wasn't the case.
Pros: Faster. Avoid early crashes StackId underflow that are meant to be more gracefully caught by CheckStacksSize() (with more explicit assert). Cons: Excercise less code.
This commit is contained in:
parent
bbd44b4edd
commit
d878462866
@ -4434,7 +4434,8 @@ void ImGui::End()
|
|||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
ImGuiWindow* window = g.CurrentWindow;
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
|
|
||||||
Columns(1, "#CloseColumns");
|
if (window->DC.ColumnsCount != 1) // close columns set if any is open
|
||||||
|
Columns(1, "#CLOSECOLUMNS");
|
||||||
PopClipRect(); // inner window clip rectangle
|
PopClipRect(); // inner window clip rectangle
|
||||||
|
|
||||||
// Stop logging
|
// Stop logging
|
||||||
|
Loading…
x
Reference in New Issue
Block a user