[gnome-music/wip/jfelder/searchview-back: 2/2] searchview: Do not go back if the main view is already visible



commit 06e9c71ee400adfae48a830d2eaff6c227693b02
Author: Jean Felder <jfelder src gnome org>
Date:   Sat Jan 4 23:15:35 2020 +0100

    searchview: Do not go back if the main view is already visible

 gnomemusic/views/searchview.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index f95e52d5..b4f4576f 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -411,7 +411,9 @@ class SearchView(Gtk.Stack):
 
     @log
     def _back_button_clicked(self, widget, data=None):
-        if self.get_visible_child() == self._scrolled_artist_window:
+        if self.get_visible_child() == self._search_results:
+            return
+        elif self.get_visible_child() == self._scrolled_artist_window:
             self.remove(self._scrolled_artist_window)
             self._scrolled_artist_window.destroy()
             self._scrolled_artist_window = None


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