forked from Wobbl/Wobuzz
Made drag n drop activate just when the playlist is fully loaded.
This commit is contained in:
parent
d8f885959b
commit
db191cbc44
3 changed files with 9 additions and 2 deletions
|
@ -4,6 +4,7 @@ import os
|
|||
import threading
|
||||
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtWidgets import QAbstractItemView
|
||||
from .track import Track
|
||||
|
||||
|
||||
|
@ -65,6 +66,11 @@ class Playlist:
|
|||
elif isinstance(self.load_from, list): # if it's created from tracks
|
||||
self.load_from_paths(self.load_from)
|
||||
|
||||
for dock_id in self.views: # enable drag and drop on every view
|
||||
view = self.views[dock_id]
|
||||
|
||||
view.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove)
|
||||
|
||||
def load_from_m3u(self, path):
|
||||
file = open(path, "r")
|
||||
m3u = file.read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue