Made the playlist tabs look prettier by making the tab title editor non-static.

This commit is contained in:
The Wobbler 2025-03-03 17:18:30 +01:00
parent 0101cf174c
commit 7ff1ad7a02
7 changed files with 46 additions and 84 deletions

View file

@ -265,7 +265,6 @@ class Playlist:
return self.current_track.sound, self.current_track.duration
def save(self):
first_view = list(self.views.values())[0]
first_view.sortItems(4, Qt.SortOrder.AscendingOrder)
self.sync(first_view)
@ -283,8 +282,6 @@ class Playlist:
wbz.close()
def rename(self, title: str):
# remove from unique names so a new playlist can have the old name and delete old playlist.
if os.path.exists(self.path):
os.remove(self.path)
@ -299,6 +296,7 @@ class Playlist:
if self == self.app.library.temporary_playlist:
self.app.library.temporary_playlist = None
# remove from unique names so a new playlist can have the old name and delete old playlist.
if not old_title == self.title: # remove only when the playlist actually has a different name
self.app.utils.unique_names.remove(old_title)