From 47ff6e8ce89e585dda8db1d10e58b3a0591ef336 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Thu, 27 Jun 2024 20:28:20 -0300 Subject: [PATCH] Work around issue with replacing tracklist option If you double-click the tracklist, it would duplicate with the refactor. --- Submariner/SBTracklistController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Submariner/SBTracklistController.swift b/Submariner/SBTracklistController.swift index dc21c6c..5a4cc28 100644 --- a/Submariner/SBTracklistController.swift +++ b/Submariner/SBTracklistController.swift @@ -56,6 +56,12 @@ import Cocoa // #MARK: - IBActions + override func trackDoubleClick(_ sender: Any!) { + // We have to override this because if the replace tracklist option is enabled, + // it duplicates the tracklist + SBPlayer.sharedInstance().play(index: self.selectedTrackRow) + } + @IBAction func delete(_ sender: Any) { if playlistTableView.selectedRow != -1 { SBPlayer.sharedInstance().remove(trackIndexSet: playlistTableView.selectedRowIndexes)