Skip to content

Commit

Permalink
Editor: Don't relay on ImGui CursorMaxPos to apply padding (ocornut/i…
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmd committed Aug 25, 2022
1 parent efd860b commit e33aad1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,6 @@ v0.9.1 (WIP):

BUGFIX: Editor: Delete item from internal list only when action accepts (#178)

BUGFIX: Editor: Cycle canvas to correctly restore view on first frame (#159)
BUGFIX: Editor: Cycle canvas to correctly restore view on first frame (#159)

BUGFIX: Editor: Don't relay on ImGui CursorMaxPos to apply padding (https://github.com/ocornut/imgui/issues/5548)
4 changes: 2 additions & 2 deletions imgui_node_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5256,9 +5256,9 @@ void ed::NodeBuilder::End()
ImGui::EndGroup();
ImGui::SameLine(0, editorStyle.NodePadding.z);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
ImGui::Dummy(ImVec2(0, 0));
ImGui::Dummy(ImVec2(0, 0)); // bump cursor at the end of the line and move to next one
ImGui::Dummy(ImVec2(0, editorStyle.NodePadding.w)); // apply padding
ImGui::PopStyleVar();
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + editorStyle.NodePadding.w);
}

// End outer group.
Expand Down

0 comments on commit e33aad1

Please sign in to comment.