Added unique names on playlist rename.
This commit is contained in:
parent
b95081e840
commit
a8560add65
3 changed files with 12 additions and 5 deletions
|
@ -8,9 +8,10 @@ from .tab_bar import PlaylistTabBar
|
|||
|
||||
|
||||
class TabTitle(QLineEdit):
|
||||
def __init__(self, label, parent, index: int, playlist_view):
|
||||
def __init__(self, app, label, parent, index: int, playlist_view):
|
||||
super().__init__(label, parent)
|
||||
|
||||
self.app = app
|
||||
self.tab_bar: PlaylistTabBar = parent
|
||||
self.index = index
|
||||
self.playlist_view = playlist_view
|
||||
|
@ -36,5 +37,8 @@ class TabTitle(QLineEdit):
|
|||
|
||||
self.playlist_view.playlist.delete()
|
||||
|
||||
self.playlist_view.playlist.title = self.text()
|
||||
name = self.app.utils.unique_name(self.text())
|
||||
self.setText(name)
|
||||
|
||||
self.playlist_view.playlist.title = name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue