[gnome-music/wip/mschraal/selection-fixes: 8/8] artistview: Avoid initial row activation selection
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/selection-fixes: 8/8] artistview: Avoid initial row activation selection
- Date: Thu, 17 Oct 2019 12:49:56 +0000 (UTC)
commit ade9d1cda837d29da6f456465bdeb8dfd68d399e
Author: Marinus Schraal <mschraal gnome org>
Date: Fri Oct 4 16:33:06 2019 +0200
artistview: Avoid initial row activation selection
On initial start the first row of ArtistsView is activated. If this
occurs while another view is in selection mode, all items of the first
row (artist) will be selected.
Use Window's active-view property to check if ArtistView is the active
view while a selection is being made.
gnomemusic/views/artistsview.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index 76f928b6..07398bc9 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -142,7 +142,8 @@ class ArtistsView(BaseView):
def _on_artist_activated(self, sidebar, row, data=None):
"""Initializes new artist album widgets"""
artist_tile = row.get_child()
- if self.props.selection_mode:
+ if (self.props.selection_mode
+ and self._window.props.active_view is self):
artist_tile.props.selected = not artist_tile.props.selected
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]