mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-15 22:46:01 +00:00
Docking: when io.ConfigDockingWithShift is enabled, fixed help tooltip erroneously reading SetNextWindowXXX() data. (#6709, #4643, #7491)
This commit is contained in:
@@ -35,6 +35,20 @@ HOW TO UPDATE?
|
|||||||
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
|
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
|
||||||
- Please report any issue!
|
- Please report any issue!
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.90.6 WIP (In Progress)
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Breaking changes:
|
||||||
|
|
||||||
|
Other changes:
|
||||||
|
|
||||||
|
Docking+Viewports Branch:
|
||||||
|
|
||||||
|
- Docking: when io.ConfigDockingWithShift is enabled, fixed help tooltip erroneously
|
||||||
|
reading SetNextWindowXXX() data. (#6709, #4643, #7491) [@ocornut, @cfillion]
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
VERSION 1.90.5 (Released 2024-04-11)
|
VERSION 1.90.5 (Released 2024-04-11)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
@@ -7445,6 +7445,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
if (window->AutoFitFramesY > 0)
|
if (window->AutoFitFramesY > 0)
|
||||||
window->AutoFitFramesY--;
|
window->AutoFitFramesY--;
|
||||||
|
|
||||||
|
// Clear SetNextWindowXXX data (can aim to move this higher in the function)
|
||||||
|
g.NextWindowData.ClearFlags();
|
||||||
|
|
||||||
// Apply focus (we need to call FocusWindow() AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there)
|
// Apply focus (we need to call FocusWindow() AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there)
|
||||||
// We ImGuiFocusRequestFlags_UnlessBelowModal to:
|
// We ImGuiFocusRequestFlags_UnlessBelowModal to:
|
||||||
// - Avoid focusing a window that is created outside of a modal. This will prevent active modal from being closed.
|
// - Avoid focusing a window that is created outside of a modal. This will prevent active modal from being closed.
|
||||||
@@ -7517,6 +7520,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
// Append
|
// Append
|
||||||
SetCurrentViewport(window, window->Viewport);
|
SetCurrentViewport(window, window->Viewport);
|
||||||
SetCurrentWindow(window);
|
SetCurrentWindow(window);
|
||||||
|
g.NextWindowData.ClearFlags();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & ImGuiWindowFlags_DockNodeHost))
|
if (!(flags & ImGuiWindowFlags_DockNodeHost))
|
||||||
@@ -7525,7 +7529,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
// 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)
|
// 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)
|
||||||
window->WriteAccessed = false;
|
window->WriteAccessed = false;
|
||||||
window->BeginCount++;
|
window->BeginCount++;
|
||||||
g.NextWindowData.ClearFlags();
|
|
||||||
|
|
||||||
// Update visibility
|
// Update visibility
|
||||||
if (first_begin_of_the_frame)
|
if (first_begin_of_the_frame)
|
||||||
@@ -19143,6 +19146,7 @@ void ImGui::BeginDockableDragDropSource(ImGuiWindow* window)
|
|||||||
// When ConfigDockingWithShift is set, display a tooltip to increase UI affordance.
|
// When ConfigDockingWithShift is set, display a tooltip to increase UI affordance.
|
||||||
// We cannot set for HoveredWindowUnderMovingWindow != NULL here, as it is only valid/useful when drag and drop is already active
|
// We cannot set for HoveredWindowUnderMovingWindow != NULL here, as it is only valid/useful when drag and drop is already active
|
||||||
// (because of the 'is_mouse_dragging_with_an_expected_destination' logic in UpdateViewportsNewFrame() function)
|
// (because of the 'is_mouse_dragging_with_an_expected_destination' logic in UpdateViewportsNewFrame() function)
|
||||||
|
IM_ASSERT(g.NextWindowData.Flags == 0);
|
||||||
if (g.IO.ConfigDockingWithShift && g.MouseStationaryTimer >= 1.0f && g.ActiveId >= 1.0f)
|
if (g.IO.ConfigDockingWithShift && g.MouseStationaryTimer >= 1.0f && g.ActiveId >= 1.0f)
|
||||||
SetTooltip("%s", LocalizeGetMsg(ImGuiLocKey_DockingHoldShiftToDock));
|
SetTooltip("%s", LocalizeGetMsg(ImGuiLocKey_DockingHoldShiftToDock));
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user