mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Ignore formatting if no data returned from model
This commit is contained in:
parent
c6f5031dd8
commit
5cbe342d5b
@ -32,7 +32,10 @@ class DetailsModel(QAbstractTableModel):
|
||||
column = index.column() + 1
|
||||
row = index.row()
|
||||
|
||||
if self.model.row(row)[0] == "Dupe Count":
|
||||
ignored_fields = ["Dupe Count"]
|
||||
if self.model.row(row)[0] in ignored_fields or \
|
||||
self.model.row(row)[1] == "---" or \
|
||||
self.model.row(row)[2] == "---":
|
||||
if role != Qt.DisplayRole:
|
||||
return None
|
||||
return self.model.row(row)[column]
|
||||
@ -45,7 +48,6 @@ class DetailsModel(QAbstractTableModel):
|
||||
font = QFont(self.model.view.font()) # or simply QFont()
|
||||
font.setBold(True)
|
||||
return font
|
||||
|
||||
return None # QVariant()
|
||||
|
||||
def headerData(self, section, orientation, role):
|
||||
|
Loading…
x
Reference in New Issue
Block a user