From 2a9c5c5229dd794022e04e26e7eb3b16003cec28 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 30 May 2012 12:26:42 +0900 Subject: [PATCH] prioritize marked over suspended 'Many of them are from earlier grammar lessons where I didn't know several vocabulary words, so during reviews I suspend those cards. Others are leeches. Occasionally I go through the list, and mark those that I'm ready to study. Then I filter on marked, and do edit->reschedule. So during this process it's hard to know which suspended cards I've marked already.' --- aqt/browser.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/aqt/browser.py b/aqt/browser.py index c613da7ba..88e851a6e 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -285,14 +285,13 @@ class StatusDelegate(QItemDelegate): # in the the middle of a reset; return nothing so this row is not # rendered until we have a chance to reset the model return - if c.queue == -1: - # custom render - brush = QBrush(QColor(COLOUR_SUSPENDED)) - painter.save() - painter.fillRect(option.rect, brush) - painter.restore() - elif c.note().hasTag("Marked"): - brush = QBrush(QColor(COLOUR_MARKED)) + col = None + if c.note().hasTag("Marked"): + col = COLOUR_MARKED + elif c.queue == -1: + col = COLOUR_SUSPENDED + if col: + brush = QBrush(QColor(col)) painter.save() painter.fillRect(option.rect, brush) painter.restore()