Made tracks in playlists not draggable because the playlist view isn't synced with the player's playlist.
This commit is contained in:
parent
efcae74382
commit
5ffdd27602
1 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ class Library:
|
|||
playlist_view = self.create_playlist_view(playlist)
|
||||
playlist_tabs.playlists[playlist.title] = playlist_view
|
||||
playlist_tabs.addTab(playlist_view, playlist.title)
|
||||
playlist_view.itemDoubleClicked.connect(self.on_track_doubleclick)
|
||||
playlist_view.itemActivated.connect(self.on_track_doubleclick)
|
||||
|
||||
def create_playlist_view(self, playlist: Playlist):
|
||||
view = PlaylistView()
|
||||
|
@ -51,8 +51,8 @@ class Library:
|
|||
|
||||
track_item.setFlags(
|
||||
Qt.ItemFlag.ItemIsEnabled |
|
||||
Qt.ItemFlag.ItemIsSelectable |
|
||||
Qt.ItemFlag.ItemIsDragEnabled
|
||||
Qt.ItemFlag.ItemIsSelectable # |
|
||||
# Qt.ItemFlag.ItemIsDragEnabled
|
||||
)
|
||||
|
||||
track_item.track = track
|
||||
|
@ -65,7 +65,7 @@ class Library:
|
|||
|
||||
return view
|
||||
|
||||
def on_track_doubleclick(self, item, column):
|
||||
def on_track_activation(self, item, column):
|
||||
index = item.treeWidget().indexOfTopLevelItem(item)
|
||||
self.app.player.play_track_in_playlist(index)
|
||||
|
||||
|
|
Loading…
Reference in a new issue