-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
In docking branch ImGuiWindowFlags_DockNodeHost == ImGuiWindowFlags_NavFlattened #8357
Copy link
Copy link
Closed
Closed
Copy link
Labels
Description
Both are 1 << 29, see
Lines 1140 to 1144 in 1dc7762
| ImGuiWindowFlags_DockNodeHost = 1 << 29, // Don't use! For internal use by Begin()/NewFrame() | |
| // Obsolete names | |
| #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS | |
| ImGuiWindowFlags_NavFlattened = 1 << 29, // Obsoleted in 1.90.9: Use ImGuiChildFlags_NavFlattened in BeginChild() call. |
This also affects v1.91.7-docking.
This for some reason can lead to crashes/assertions when using ImGuiWindowFlags_NavFlattened
Example:
void ImDrawListSplitter::SetCurrentChannel(ImDrawList*, int): Assertion `idx >= 0 && idx < _Count' failed.
(... assert impl stuff ...)
ImDrawListSplitter::SetCurrentChannel() at imgui_draw.cpp:2,197 0x555555894013
ImDrawList::ChannelsSetCurrent() at imgui.h:3,288 0x55555586a904
ImGui::RenderWindowDecorations() at imgui.cpp:7,107 0x5555558297fe
ImGui::Begin() at imgui.cpp:8,005 0x55555582e19b
ImGui::BeginChildEx() at imgui.cpp:6,360 0x555555825858
ImGui::BeginChild() at imgui.cpp:6,256 0x5555558253f4
BeginTabChild() at Dhewm3SettingsMenu.cpp:2,393 0x5555556acbef
Com_DrawDhewm3SettingsMenu() at Dhewm3SettingsMenu.cpp:2,455 0x5555556acea6
(...)
where BeginTabChild() calls ImGui::BeginChild( name, ImVec2(0, 0), 0, ImGuiWindowFlags_NavFlattened );
I got rid of the assertion by using ImGuiChildFlags_NavFlattened instead of the deprecated window flag.
I also tested defining ImGuiWindowFlags_NavFlattened as 1 << 31, that fixes my problem as well and 1 << 23 also works
Reactions are currently unavailable