From 5cb47489b0bc1ad5df4413a9852f87a4988f8c0b Mon Sep 17 00:00:00 2001 From: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com> Date: Mon, 14 Sep 2026 15:53:15 -0700 Subject: [PATCH] fix: wacky loop in color_data.py --- src/tagstudio/qt/controllers/tiles/color_data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tagstudio/qt/controllers/tiles/color_data.py b/src/tagstudio/qt/controllers/tiles/color_data.py index a9489208..4b311f2d 100644 --- a/src/tagstudio/qt/controllers/tiles/color_data.py +++ b/src/tagstudio/qt/controllers/tiles/color_data.py @@ -59,8 +59,10 @@ class ColorData(TileData): max_width = 60 color_widgets: list[TagColorLabel] = [] - while (item := self.layout().itemAt(0)) and (widget := item.widget()): - widget.deleteLater() + layout = self.layout() + while item := layout.takeAt(0): + if widget := item.widget(): + widget.deleteLater() for color in colors_: color_widget = TagColorLabel(