Update sync.py

This commit is contained in:
Broque Thomas 2025-08-20 17:30:36 -07:00
parent 41bb4d5745
commit 6d57102c54

View file

@ -1915,7 +1915,9 @@ class PlaylistDetailsModal(QDialog):
def refresh_track_table(self):
"""Refresh the track table with loaded tracks"""
import traceback
logger.info(f"refresh_track_table called for playlist {self.playlist.name}")
logger.debug(f"Call stack: {traceback.format_stack()[-3:-1]}") # Show who called this method
if not hasattr(self, 'track_table'):
logger.error("No track_table attribute found")
@ -1978,6 +1980,15 @@ class PlaylistDetailsModal(QDialog):
logger.info(f"Finished populating all {len(tracks_to_show)} tracks")
# Force table refresh and repaint
try:
self.track_table.resizeColumnsToContents()
self.track_table.viewport().update()
self.track_table.repaint()
logger.info("Forced table refresh and repaint")
except Exception as e:
logger.error(f"Error during table refresh: {e}")
# Add info message if tracks were limited
if total_tracks > display_limit:
# Update the modal title to show track count info