Columns: Make sure the ClipRect is valid. (#3475)

This commit is contained in:
Bartosz Szreder 2020-09-16 15:17:45 +02:00 committed by ocornut
parent a1597cff08
commit d2939ce0a1
2 changed files with 3 additions and 1 deletions

View File

@ -64,6 +64,8 @@ Other Changes:
- Tab Bar: Keep tab item close button visible while dragging a tab (independent of hovering state). - Tab Bar: Keep tab item close button visible while dragging a tab (independent of hovering state).
- Tab Bar: Fixed a small bug where toggling a tab bar from Reorderable to not Reorderable would leave - Tab Bar: Fixed a small bug where toggling a tab bar from Reorderable to not Reorderable would leave
tabs reordered in the tab list popup. [@Xipiryon] tabs reordered in the tab list popup. [@Xipiryon]
- Columns: Fix inverted ClipRect being passed to renderer when using certain primitives inside of
a fully clipped column. (#3475) [@szreder]
- Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible. - Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible.
- Demo: Add simple InputText() callbacks demo (aside from the more elaborate ones in 'Examples->Console'). - Demo: Add simple InputText() callbacks demo (aside from the more elaborate ones in 'Examples->Console').
- Backends: Vulkan: Some internal refactor aimed at allowing multi-viewport feature to create their - Backends: Vulkan: Some internal refactor aimed at allowing multi-viewport feature to create their

View File

@ -7938,7 +7938,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiColumnsFlag
float clip_x1 = IM_ROUND(window->Pos.x + GetColumnOffset(n)); float clip_x1 = IM_ROUND(window->Pos.x + GetColumnOffset(n));
float clip_x2 = IM_ROUND(window->Pos.x + GetColumnOffset(n + 1) - 1.0f); float clip_x2 = IM_ROUND(window->Pos.x + GetColumnOffset(n + 1) - 1.0f);
column->ClipRect = ImRect(clip_x1, -FLT_MAX, clip_x2, +FLT_MAX); column->ClipRect = ImRect(clip_x1, -FLT_MAX, clip_x2, +FLT_MAX);
column->ClipRect.ClipWith(window->ClipRect); column->ClipRect.ClipWithFull(window->ClipRect);
} }
if (columns->Count > 1) if (columns->Count > 1)