mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-14 18:06:58 +00:00
Don't trigger playlist update multiple times when inserting files
This commit is contained in:
parent
efe32b406e
commit
8fb06b3faf
@ -146,6 +146,7 @@ class MainWindow(QtGui.QMainWindow):
|
||||
window.addFolderToPlaylist(dropfilepath)
|
||||
else:
|
||||
super(MainWindow.PlaylistWidget, self).dropEvent(event)
|
||||
window.playlistUpdated()
|
||||
|
||||
class PlaylistWidget(QtGui.QListWidget):
|
||||
selfWindow = None
|
||||
@ -162,11 +163,6 @@ class MainWindow(QtGui.QMainWindow):
|
||||
super(MainWindow.PlaylistWidget, self).rowsMoved(sourceParent, sourceStart, sourceEnd, destinationParent, destinationRow)
|
||||
self.selfWindow.playlistUpdated()
|
||||
|
||||
def rowsInserted(self, parent, start, end):
|
||||
if self.selfWindow:
|
||||
super(MainWindow.PlaylistWidget, self).rowsInserted(parent, start, end)
|
||||
self.selfWindow.playlistUpdated()
|
||||
|
||||
def rowsRemoved(self, parent, start, end):
|
||||
if self.selfWindow:
|
||||
super(MainWindow.PlaylistWidget, self).rowsRemoved(parent, start, end)
|
||||
@ -207,6 +203,7 @@ class MainWindow(QtGui.QMainWindow):
|
||||
window.setPlaylistInsertPosition(indexRow)
|
||||
else:
|
||||
super(MainWindow.PlaylistWidget, self).dragMoveEvent(event)
|
||||
self.selfWindow.playlistUpdated()
|
||||
|
||||
def dropEvent(self, event):
|
||||
window = self.parent().parent().parent().parent().parent().parent()
|
||||
|
Loading…
Reference in New Issue
Block a user