浏览代码

Columns: Removed unnecessary/misleading dummy ItemSize(). Was fixed already before, and fixed again in this branch by 3bf2af23e641909890a568850e5dac8ebf8930f8. (#913, #125). End() calls EndColumns() directly.

omar 8 年之前
父节点
当前提交
9307631c90
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      imgui.cpp

+ 1 - 3
imgui.cpp

@@ -4450,7 +4450,7 @@ void ImGui::End()
     ImGuiWindow* window = g.CurrentWindow;
     ImGuiWindow* window = g.CurrentWindow;
 
 
     if (window->DC.ColumnsCount != 1) // close columns set if any is open
     if (window->DC.ColumnsCount != 1) // close columns set if any is open
-        Columns(1, "#CLOSECOLUMNS");
+        EndColumns();
     PopClipRect();   // inner window clip rectangle
     PopClipRect();   // inner window clip rectangle
 
 
     // Stop logging
     // Stop logging
@@ -10078,8 +10078,6 @@ void ImGui::EndColumns()
 	ImGuiWindow* window = GetCurrentWindow();
 	ImGuiWindow* window = GetCurrentWindow();
 	IM_ASSERT(window->DC.ColumnsCount > 1);
 	IM_ASSERT(window->DC.ColumnsCount > 1);
 
 
-	if (window->DC.ColumnsCurrent != 0)
-		ItemSize(ImVec2(0, 0));   // Advance to column 0
 	PopItemWidth();
 	PopItemWidth();
 	PopClipRect();
 	PopClipRect();
 	window->DrawList->ChannelsMerge();
 	window->DrawList->ChannelsMerge();