Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EditorContext::Begin: handle ImGuiEx::Canvas::Begin return at initial setup #186

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions imgui_node_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,9 @@ void ed::EditorContext::Begin(const char* id, const ImVec2& size)

if (!m_IsInitialized)
{
// Cycle canvas so it has a change to setup its size before settings are loaded
m_Canvas.Begin(id, canvasSize);
m_Canvas.End();
// Cycle canvas, so it has a chance to set up its size before settings are loaded
if (m_Canvas.Begin(id, canvasSize))
m_Canvas.End();

LoadSettings();
m_IsInitialized = true;
Expand Down