Skip to content

Commit

Permalink
Fix a bug with borders that could cause duplicate IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Dec 11, 2024
1 parent d2e6be6 commit ff3b69d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clay.h
Original file line number Diff line number Diff line change
Expand Up @@ -2683,10 +2683,10 @@ void Clay__CalculateFinalLayout() {
Clay_BoundingBox currentElementBoundingBox = currentElementData->boundingBox;
Clay_BorderElementConfig *borderConfig = Clay__FindElementConfigWithType(currentElement, CLAY__ELEMENT_CONFIG_TYPE_BORDER_CONTAINER).borderElementConfig;
Clay_RenderCommand renderCommand = CLAY__INIT(Clay_RenderCommand) {
.commandType = CLAY_RENDER_COMMAND_TYPE_BORDER,
.boundingBox = currentElementBoundingBox,
.config = { .borderElementConfig = borderConfig },
.id = currentElement->id,
.id = Clay__RehashWithNumber(currentElement->id, 4),
.commandType = CLAY_RENDER_COMMAND_TYPE_BORDER,
};
Clay__AddRenderCommand(renderCommand);
if (borderConfig->betweenChildren.width > 0 && borderConfig->betweenChildren.color.a > 0) {
Expand Down

0 comments on commit ff3b69d

Please sign in to comment.