Skip to content

Commit

Permalink
Fix some ImGui asserts under certain conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Mar 12, 2024
1 parent a0e963e commit 26b70c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imnodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2288,9 +2288,11 @@ void BeginNodeEditor()
offsetof(ImGuiIO, SetPlatformImeDataFn) +
sizeof(GImNodes->OriginalImgCtx->IO.SetPlatformImeDataFn));

GImNodes->NodeEditorImgCtx->IO.BackendPlatformUserData = nullptr;
GImNodes->NodeEditorImgCtx->IO.BackendRendererUserData = nullptr;
GImNodes->NodeEditorImgCtx->IO.IniFilename = nullptr;
GImNodes->NodeEditorImgCtx->IO.ConfigInputTrickleEventQueue = false;
GImNodes->NodeEditorImgCtx->IO.DisplaySize = canvas_size / editor.ZoomScale;
GImNodes->NodeEditorImgCtx->IO.DisplaySize = ImMax(canvas_size / editor.ZoomScale, ImVec2(0, 0));
GImNodes->NodeEditorImgCtx->Style = GImNodes->OriginalImgCtx->Style;

// Nav (tabbing) needs to be disabled otherwise it doubles up with the main context
Expand Down

0 comments on commit 26b70c5

Please sign in to comment.