Merge branch 'master' into docking

# Conflicts:
#	imgui.cpp
This commit is contained in:
omar
2019-02-24 23:24:07 +01:00
7 changed files with 140 additions and 82 deletions

View File

@ -3678,7 +3678,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
const int buf_display_max_length = 2 * 1024 * 1024;
// Select which buffer we are going to display. We set buf to NULL to prevent accidental usage from now on.
const char* buf_display = (state != NULL && !is_readonly) ? state->TextA.Data : buf;
const char* buf_display = (g.ActiveId == id && state && !is_readonly) ? state->TextA.Data : buf;
IM_ASSERT(buf_display);
buf = NULL;
@ -4829,7 +4829,7 @@ bool ImGui::TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags)
// When logging is enabled, we automatically expand tree nodes (but *NOT* collapsing headers.. seems like sensible behavior).
// NB- If we are above max depth we still allow manually opened nodes to be logged.
if (g.LogEnabled && !(flags & ImGuiTreeNodeFlags_NoAutoOpenOnLog) && window->DC.TreeDepth < g.LogAutoExpandMaxDepth)
if (g.LogEnabled && !(flags & ImGuiTreeNodeFlags_NoAutoOpenOnLog) && (window->DC.TreeDepth - g.LogDepthRef) < g.LogDepthToExpand)
is_open = true;
return is_open;
@ -4956,7 +4956,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
const char log_suffix[] = "##";
LogRenderedText(&text_pos, log_prefix, log_prefix+3);
RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
LogRenderedText(&text_pos, log_suffix+1, log_suffix+3);
LogRenderedText(&text_pos, log_suffix, log_suffix+2);
}
else
{