From 6309e7e318d7d5e2aa7916c575c90a796d4b1d05 Mon Sep 17 00:00:00 2001 From: Zach H Date: Mon, 13 Jan 2025 23:33:21 -0500 Subject: [PATCH] Fix Windows FlowWidget duplication (#5460) - Delete the item widget right away, as the delay is too great with deleteLater --- .../ui/widgets/general/layout_containers/flow_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp b/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp index 958cc98be..bc28af5c3 100644 --- a/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp +++ b/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp @@ -102,8 +102,8 @@ void FlowWidget::clearLayout() if (flowLayout != nullptr) { QLayoutItem *item; while ((item = flowLayout->takeAt(0)) != nullptr) { - item->widget()->deleteLater(); // Delete the widget - delete item; // Delete the layout item + delete item->widget(); // Delete the widget + delete item; // Delete the layout item } } else { if (scrollArea->horizontalScrollBarPolicy() != Qt::ScrollBarAlwaysOff &&