[gnome-music] albumsview: Disable flowbox selection when selection is cancelled



commit 8b4591d96a42c33f285301fbb332449da75bf51a
Author: Mpho Jele <mphokjele gmail com>
Date:   Tue Aug 17 22:54:55 2021 +0200

    albumsview: Disable flowbox selection when selection is cancelled
    
    When selection is cancelled the flowbox still has selection-mode as
    Gtk.SelectionMode.MULTIPLE(but only if some album was selected through
    its checkButton).  This results in the next click triggering selection
    instead of opening the requested album.  The bug is not there when not
    selecting by the checkButton since in that case
    _on_selected_chidren_changed does set flowbox selection-mode to
    Gtk.SelectionMode.NONE after processing the gesture.
    
    Closes: #460

 gnomemusic/views/albumsview.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index 38806f57f..dff833e2c 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -159,6 +159,7 @@ class AlbumsView(Gtk.Stack):
         self.props.selection_mode = selection_mode
         if not self.props.selection_mode:
             self.deselect_all()
+            self._flowbox.props.selection_mode = Gtk.SelectionMode.NONE
 
     def _on_search_mode_changed(self, klass, param):
         if (not self.props.search_mode_active


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