From 67b4fa7d497bc07693dd16ed27aa6661e8c51907 Mon Sep 17 00:00:00 2001 From: ZeldaZach Date: Mon, 13 Jan 2025 22:58:29 -0500 Subject: [PATCH] Fix Windows FlowWidget duplication - 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 &&