aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool_qt.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-04 17:55:00 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-04 17:55:00 +0100
commit2b4323eca801638f0a305ff29afe815a45e103b1 (patch)
treed130038b86d671d78eb52e56ce8d2b9b3bd16842 /solo_tool_qt.py
parentc4cb9a96342568890dcf1e36d02d6180bdb26ac8 (diff)
Added current value to notification system, fixed Qt hack
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)