mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 09:30:56 +01:00
Begin: Fix for unused "Debug" (fix for 3b83cd24f5
)
This commit is contained in:
parent
8dd7648db2
commit
267ea506de
@ -4618,9 +4618,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
window->InnerRect.Max.x = window->Pos.x + window->Size.x - window->ScrollbarSizes.x;
|
window->InnerRect.Max.x = window->Pos.x + window->Size.x - window->ScrollbarSizes.x;
|
||||||
window->InnerRect.Max.y = window->Pos.y + window->Size.y - window->ScrollbarSizes.y;
|
window->InnerRect.Max.y = window->Pos.y + window->Size.y - window->ScrollbarSizes.y;
|
||||||
//window->DrawList->AddRect(window->InnerRect.Min, window->InnerRect.Max, IM_COL32_WHITE);
|
//window->DrawList->AddRect(window->InnerRect.Min, window->InnerRect.Max, IM_COL32_WHITE);
|
||||||
|
|
||||||
// Clear 'accessed' flag last thing
|
|
||||||
window->Accessed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inner clipping rectangle
|
// Inner clipping rectangle
|
||||||
@ -4633,6 +4630,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
clip_rect.Max.y = ImFloor(0.5f + window->InnerRect.Max.y - border_size);
|
clip_rect.Max.y = ImFloor(0.5f + window->InnerRect.Max.y - border_size);
|
||||||
PushClipRect(clip_rect.Min, clip_rect.Max, true);
|
PushClipRect(clip_rect.Min, clip_rect.Max, true);
|
||||||
|
|
||||||
|
// Clear 'accessed' flag last thing (After PushClipRect which will set the flag. We want the flag to stay false when the default "Debug" window is unused)
|
||||||
|
if (first_begin_of_the_frame)
|
||||||
|
window->Accessed = false;
|
||||||
|
|
||||||
window->BeginCount++;
|
window->BeginCount++;
|
||||||
g.SetNextWindowSizeConstraint = false;
|
g.SetNextWindowSizeConstraint = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user