mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-29 01:44:37 +01:00
Begin(): Removed unnecessary code (at the time of 1.18 commit e9e0e36f98
, CursorPos was used to compute SizeContentsFit and this was necessary)
This commit is contained in:
parent
89cae37b49
commit
a9c6a0f6ec
@ -3984,7 +3984,6 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||||||
bool window_pos_set_by_api = false, window_size_set_by_api = false;
|
bool window_pos_set_by_api = false, window_size_set_by_api = false;
|
||||||
if (g.SetNextWindowPosCond)
|
if (g.SetNextWindowPosCond)
|
||||||
{
|
{
|
||||||
const ImVec2 backup_cursor_pos = window->DC.CursorPos; // FIXME: not sure of the exact reason of this saving/restore anymore :( need to look into that.
|
|
||||||
if (window->Appearing)
|
if (window->Appearing)
|
||||||
window->SetWindowPosAllowFlags |= ImGuiCond_Appearing;
|
window->SetWindowPosAllowFlags |= ImGuiCond_Appearing;
|
||||||
window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) != 0;
|
window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) != 0;
|
||||||
@ -3997,7 +3996,6 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||||||
{
|
{
|
||||||
SetWindowPos(window, g.SetNextWindowPosVal, g.SetNextWindowPosCond);
|
SetWindowPos(window, g.SetNextWindowPosVal, g.SetNextWindowPosCond);
|
||||||
}
|
}
|
||||||
window->DC.CursorPos = backup_cursor_pos;
|
|
||||||
g.SetNextWindowPosCond = 0;
|
g.SetNextWindowPosCond = 0;
|
||||||
}
|
}
|
||||||
if (g.SetNextWindowSizeCond)
|
if (g.SetNextWindowSizeCond)
|
||||||
@ -4042,7 +4040,6 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||||||
window->RootWindow = g.CurrentWindowStack[root_idx];
|
window->RootWindow = g.CurrentWindowStack[root_idx];
|
||||||
window->RootNonPopupWindow = g.CurrentWindowStack[root_non_popup_idx]; // Used to display TitleBgActive color and for selecting which window to use for NavWindowing
|
window->RootNonPopupWindow = g.CurrentWindowStack[root_non_popup_idx]; // Used to display TitleBgActive color and for selecting which window to use for NavWindowing
|
||||||
|
|
||||||
|
|
||||||
// When reusing window again multiple times a frame, just append content (don't need to setup again)
|
// When reusing window again multiple times a frame, just append content (don't need to setup again)
|
||||||
if (first_begin_of_the_frame)
|
if (first_begin_of_the_frame)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user