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



commit 7901fa99f087137095eb27dfbbfea8b938556074
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
    
    (cherry picked from commit 839e8d858adf068f3fbf59bfbd77d5689daa59f1)

 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]