mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 13:08:47 +02:00
Internals: reduced side-effects of setting window->HiddenFramesForRenderOnly > 0
This commit is contained in:
@ -7070,7 +7070,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
window->HiddenFramesCanSkipItems = 1;
|
||||
|
||||
// Update the Hidden flag
|
||||
window->Hidden = (window->HiddenFramesCanSkipItems > 0) || (window->HiddenFramesCannotSkipItems > 0) || (window->HiddenFramesForRenderOnly > 0);
|
||||
bool hidden_regular = (window->HiddenFramesCanSkipItems > 0) || (window->HiddenFramesCannotSkipItems > 0);
|
||||
window->Hidden = hidden_regular || (window->HiddenFramesForRenderOnly > 0);
|
||||
|
||||
// Disable inputs for requested number of frames
|
||||
if (window->DisableInputsFrames > 0)
|
||||
@ -7081,7 +7082,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
|
||||
// Update the SkipItems flag, used to early out of all items functions (no layout required)
|
||||
bool skip_items = false;
|
||||
if (window->Collapsed || !window->Active || window->Hidden)
|
||||
if (window->Collapsed || !window->Active || hidden_regular)
|
||||
if (window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0 && window->HiddenFramesCannotSkipItems <= 0)
|
||||
skip_items = true;
|
||||
window->SkipItems = skip_items;
|
||||
|
Reference in New Issue
Block a user