diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-01-04 17:55:00 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-01-04 17:55:00 +0100 |
commit | 2b4323eca801638f0a305ff29afe815a45e103b1 (patch) | |
tree | d130038b86d671d78eb52e56ce8d2b9b3bd16842 /solo_tool_qt.py | |
parent | c4cb9a96342568890dcf1e36d02d6180bdb26ac8 (diff) |
Added current value to notification system, fixed Qt hack
Diffstat (limited to 'solo_tool_qt.py')
-rw-r--r-- | solo_tool_qt.py | 6 |
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) |