V3: fix display corruption when moving a header row

This commit is contained in:
Keith Edmunds 2023-11-28 21:13:16 +00:00
parent f9b8f1d8d3
commit 63340a408d

View File

@ -790,12 +790,15 @@ class PlaylistModel(QAbstractTableModel):
# Optimise: only add to map if there is a change
if old_row != new_row:
row_map[old_row] = new_row
if self.is_header_row(old_row):
# Reset column span
self.signals.span_cells_signal.emit(
old_row, HEADER_NOTES_COLUMN, 1, 1
)
# Reset any header rows that we're moving
for moving_row in row_map:
if self.is_header_row(moving_row):
# Reset column span
print(f"Reset column span {moving_row=}")
self.signals.span_cells_signal.emit(
moving_row, HEADER_NOTES_COLUMN, 1, 1
)
# Check to see whether any rows in track_sequence have moved
if track_sequence.previous.plr_rownum in row_map:
track_sequence.previous.plr_rownum = row_map[