parent
8f51e790b5
commit
03f19dfb9c
@ -220,12 +220,11 @@ class PlaylistModel(QAbstractTableModel):
|
||||
else:
|
||||
return QBrush(QColor(Config.COLOUR_BITRATE_OK))
|
||||
if column == Col.NOTE.value:
|
||||
with Session() as session:
|
||||
note_colour = NoteColours.get_colour(session, prd.note)
|
||||
if note_colour:
|
||||
return QBrush(QColor(note_colour))
|
||||
else:
|
||||
return QBrush()
|
||||
if prd.note:
|
||||
with Session() as session:
|
||||
note_colour = NoteColours.get_colour(session, prd.note)
|
||||
if note_colour:
|
||||
return QBrush(QColor(note_colour))
|
||||
|
||||
return QBrush()
|
||||
|
||||
|
||||
@ -671,12 +671,9 @@ class PlaylistTab(QTableView):
|
||||
if not header:
|
||||
return
|
||||
|
||||
# Set width of last column to zero as it's set to stretch
|
||||
self.setColumnWidth(header.count() - 1, 0)
|
||||
|
||||
# Set remaining column widths from settings
|
||||
# Last column is set to stretch so ignore it here
|
||||
with Session() as session:
|
||||
for column_number in range(header.count() - 1):
|
||||
for column_number in range(header.count() - 2):
|
||||
attr_name = f"playlist_col_{column_number}_width"
|
||||
record = Settings.get_int_settings(session, attr_name)
|
||||
if record.f_int is not None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user