aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool_qt.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo_tool_qt.py')
-rw-r--r--solo_tool_qt.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/solo_tool_qt.py b/solo_tool_qt.py
index a6823e0..25a15fb 100644
--- a/solo_tool_qt.py
+++ b/solo_tool_qt.py
@@ -41,7 +41,7 @@ class ABListModel(QAbstractListModel):
return len(self.soloTool.getStoredAbLimits())
class MainWindow(QMainWindow, Ui_MainWindow):
- songChangeSignal = pyqtSignal()
+ songChangeSignal = pyqtSignal(int)
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
@@ -170,14 +170,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.abListModel.layoutChanged.emit()
self.clearListViewSelection(self.abListView)
- def currentSongChanged(self):
+ def currentSongChanged(self, songIndex):
if self.songChangePending == CHANGE_GUI:
self.songChangePending = None
else:
assert self.songChangePending is None
self.songChangePending = CHANGE_INTERNAL
- # TODO fix this hack
- songIndex = self.soloTool._playlist.getCurrentSongIndex()
print(f"Forcing selection to {songIndex}")
i = self.playlistModel.createIndex(songIndex, 0)
self.songListView.selectionModel().select(i, QItemSelectionModel.ClearAndSelect)