Fixed some bugs that happened when tracks got rearranged.
This commit is contained in:
parent
b2bd8ef784
commit
519b2d0adb
10 changed files with 72 additions and 17 deletions
|
@ -24,14 +24,21 @@ class PlaylistTabBar(QTabBar):
|
|||
|
||||
self.setAcceptDrops(True)
|
||||
|
||||
self.tabBarClicked.connect(self.on_click)
|
||||
self.tabBarDoubleClicked.connect(self.on_doubleclick)
|
||||
|
||||
def dragEnterEvent(self, event: QDragEnterEvent):
|
||||
index = self.tabAt(event.position().toPoint())
|
||||
|
||||
self.tab_widget.setCurrentIndex(index)
|
||||
|
||||
def mouseDoubleClickEvent(self, event: QMouseEvent):
|
||||
index = self.tabAt(event.position().toPoint())
|
||||
def on_click(self, index):
|
||||
playlist_view = self.tab_widget.widget(index)
|
||||
playlist = playlist_view.playlist
|
||||
|
||||
self.app.gui.clicked_playlist = playlist
|
||||
|
||||
def on_doubleclick(self, index):
|
||||
playlist_view = self.tab_widget.widget(index)
|
||||
playlist = playlist_view.playlist
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue