Skip to content

Commit e33aad1

Browse files
committed
Editor: Don't relay on ImGui CursorMaxPos to apply padding (ocornut/imgui#5548)
1 parent efd860b commit e33aad1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/CHANGELOG.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,6 @@ v0.9.1 (WIP):
216216

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

219-
BUGFIX: Editor: Cycle canvas to correctly restore view on first frame (#159)
219+
BUGFIX: Editor: Cycle canvas to correctly restore view on first frame (#159)
220+
221+
BUGFIX: Editor: Don't relay on ImGui CursorMaxPos to apply padding (https://github.com/ocornut/imgui/issues/5548)

imgui_node_editor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5256,9 +5256,9 @@ void ed::NodeBuilder::End()
52565256
ImGui::EndGroup();
52575257
ImGui::SameLine(0, editorStyle.NodePadding.z);
52585258
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
5259-
ImGui::Dummy(ImVec2(0, 0));
5259+
ImGui::Dummy(ImVec2(0, 0)); // bump cursor at the end of the line and move to next one
5260+
ImGui::Dummy(ImVec2(0, editorStyle.NodePadding.w)); // apply padding
52605261
ImGui::PopStyleVar();
5261-
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + editorStyle.NodePadding.w);
52625262
}
52635263

52645264
// End outer group.

0 commit comments

Comments
 (0)