Commits

Yuya Nishihara  committed 31f733f

htmldelegate: eliminate indirect lookup of model data

  • Participants
  • Parent commits a0a4f1f

Comments (0)

Files changed (1)

File tortoisehg/hgqt/htmldelegate.py

         return QSize(doc.idealWidth() + 5, doc.size().height())
 
     def _builddoc(self, option, index):
-        text = index.model().data(index, Qt.DisplayRole).toString()
         doc = QTextDocument(defaultFont=option.font)
-        doc.setHtml(text)
+        doc.setHtml(index.data().toString())
         return doc