mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-01 09:44:20 +08:00
Docking: Fixed a bug where ClassId compare tests (when using SetNextWindowClass) on success would prevent further filter from running. (#6882)
This commit is contained in:
@@ -127,6 +127,12 @@ Docking+Viewports Branch:
|
|||||||
- Docking: renamed ImGuiDockNodeFlags_NoDockingInCentralNode to ImGuiDockNodeFlags_NoDockingOverCentralNode.
|
- Docking: renamed ImGuiDockNodeFlags_NoDockingInCentralNode to ImGuiDockNodeFlags_NoDockingOverCentralNode.
|
||||||
- Docking: Internals: renamed ImGuiDockNodeFlags_NoDockingSplitMe to ImGuiDockNodeFlags_NoDockingSplit.
|
- Docking: Internals: renamed ImGuiDockNodeFlags_NoDockingSplitMe to ImGuiDockNodeFlags_NoDockingSplit.
|
||||||
|
|
||||||
|
Docking+Viewports Branch:
|
||||||
|
|
||||||
|
- Docking: Fixed a bug where ClassId compare tests (when using SetNextWindowClass)
|
||||||
|
on success would prevent further filter from running, namely the one that prevent
|
||||||
|
docking over a popup.
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
VERSION 1.89.9 (Released 2023-09-04)
|
VERSION 1.89.9 (Released 2023-09-04)
|
||||||
|
|||||||
@@ -17059,11 +17059,13 @@ static bool DockNodeIsDropAllowedOne(ImGuiWindow* payload, ImGuiWindow* host_win
|
|||||||
ImGuiWindowClass* payload_class = &payload->WindowClass;
|
ImGuiWindowClass* payload_class = &payload->WindowClass;
|
||||||
if (host_class->ClassId != payload_class->ClassId)
|
if (host_class->ClassId != payload_class->ClassId)
|
||||||
{
|
{
|
||||||
|
bool pass = false;
|
||||||
if (host_class->ClassId != 0 && host_class->DockingAllowUnclassed && payload_class->ClassId == 0)
|
if (host_class->ClassId != 0 && host_class->DockingAllowUnclassed && payload_class->ClassId == 0)
|
||||||
return true;
|
pass = true;
|
||||||
if (payload_class->ClassId != 0 && payload_class->DockingAllowUnclassed && host_class->ClassId == 0)
|
if (payload_class->ClassId != 0 && payload_class->DockingAllowUnclassed && host_class->ClassId == 0)
|
||||||
return true;
|
pass = true;
|
||||||
return false;
|
if (!pass)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent docking any window created above a popup
|
// Prevent docking any window created above a popup
|
||||||
|
|||||||
Reference in New Issue
Block a user