From 24c973483c9a74bb1c1d58ff41c697840525c850 Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Sun, 8 Nov 2026 09:00:58 +0100 Subject: [PATCH] Apply suggestion from @ZeldaZach Co-authored-by: Zach H --- cockatrice/src/interface/widgets/tabs/alt_table_delegate.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cockatrice/src/interface/widgets/tabs/alt_table_delegate.cpp b/cockatrice/src/interface/widgets/tabs/alt_table_delegate.cpp index b011925ce..9fb6a7ffe 100644 --- a/cockatrice/src/interface/widgets/tabs/alt_table_delegate.cpp +++ b/cockatrice/src/interface/widgets/tabs/alt_table_delegate.cpp @@ -85,9 +85,7 @@ void AltTableDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti } if (index.column() == activeColumn) { - const QVariant activeData = index.data(Qt::UserRole); - const bool active = - activeData.isValid() ? activeData.toBool() : text.compare(QStringLiteral("yes"), Qt::CaseInsensitive) == 0; + const bool active = index.data(Qt::UserRole).toBool(); const QPalette::ColorRole tintRole = active ? QPalette::Highlight : QPalette::PlaceholderText; if (!pill_painter::paint(painter, opt, tintRole, emphasisRole, text)) { QStyledItemDelegate::paint(painter, opt, index);