[gnome-music/wip/jfelder/38-fix-playlist-deletion-delete-key: 4/5] window: Do not try to delete a playlist when renamed




commit 36194123428fad8b7965e26f5d4a2e78f2da1f1f
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Feb 24 20:06:53 2021 +0100

    window: Do not try to delete a playlist when renamed

 gnomemusic/window.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 3f9b101e8..4e60b6a71 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -368,7 +368,8 @@ class Window(Gtk.ApplicationWindow):
 
             child = self.props.active_view
             if (keyval == Gdk.KEY_Delete
-                    and child == self.views[View.PLAYLIST]):
+                    and child == self.views[View.PLAYLIST]
+                    and not self.views[View.PLAYLIST].rename_active):
                 self.views[View.PLAYLIST].remove_playlist()
             # Close selection mode or search bar after Esc is pressed
             if keyval == Gdk.KEY_Escape:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]