From 1753534e204022358167203013af0c2511354559 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Fri, 23 Feb 2024 17:30:01 +0000 Subject: [PATCH] Allow canceling Audactity edit Fixes #221 --- app/playlists.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/playlists.py b/app/playlists.py index 70acebb..cae23a4 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -413,6 +413,10 @@ class PlaylistTab(QTableView): "Update from Audacity", lambda: self._import_from_audacity(model_row_number), ) + self._add_context_menu( + "Cancel Audacity", + lambda: self._cancel_audacity(), + ) else: self._add_context_menu( "Open in Audacity", lambda: self._open_in_audacity(model_row_number) @@ -494,6 +498,14 @@ class PlaylistTab(QTableView): "Copy track path", lambda: self._copy_path(model_row_number) ) + def _cancel_audacity(self): + """ + Cancel Audacity editing. We don't do anything with Audacity, just "forget" + that we have an edit open. + """ + + self.musicmuster.audacity_file_path = None + def clear_selection(self) -> None: """Unselect all tracks and reset drag mode"""