diff --git a/aqt/browser.py b/aqt/browser.py index d3b1b464e..a5e502b71 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -312,6 +312,17 @@ class DataModel(QAbstractTableModel): return "" return time.strftime("%Y-%m-%d", time.localtime(date)) + def isRTL(self, index): + col = index.column() + type = self.columnType(col) + if type != "noteFld": + return False + + row = index.row() + c = self.getCard(index) + nt = c.note().model() + return nt['flds'][self.col.models.sortIdx(nt)]['rtl'] + # Line painter ###################################################################### @@ -343,6 +354,9 @@ class StatusDelegate(QItemDelegate): finally: self.browser.mw.progress.blockUpdates = True + if self.model.isRTL(index): + option.direction = Qt.RightToLeft + col = None if c.queue == -1: col = COLOUR_SUSPENDED