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




commit b91f4e8ed08d41ae3a5be756ffe7f4c808e1a5dd
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]