-
Notifications
You must be signed in to change notification settings - Fork 615
Open
Description
It seems like Node Editor can not initialize correctly when the ImGui::GetContentRegionAvail()
returns an {0, 0} (or {-123,-456}, etc.)...
But If I have a complex layout ( I am using the docking branch of imgui ), there may be such a moment that the "region" is (0,0) or even minus numbers.
And Node Editor will definitely throw an error!
For now, I fix it with a simple "if" check.
ImGui::Begin("##window");
auto size = ImGui::GetContentRegionAvail();
if (size.x <= 0 || size.y <= 0)
{
ImGui::End();
return;
}
ed::Begin("##editor");
//...
ed::End();
ImGui::End();
There is one more bug when I am using the docking branch...
It will show a weird scrollbar when I drag the window to another screen.
And I am suppressing it with an "ImGuiWindowFlags_NoScrollbar" child window...
Sorry for my poor English.
Metadata
Metadata
Assignees
Labels
No labels