[gnome-music/wip/mschraal/308-empty-artistsview: 2/3] artistsview: Do not activate a row when empty
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/308-empty-artistsview: 2/3] artistsview: Do not activate a row when empty
- Date: Sat, 24 Aug 2019 10:37:22 +0000 (UTC)
commit 4eed1637a5dc74ac1685d83689b0097cf52bc52f
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Aug 22 00:14:24 2019 +0200
artistsview: Do not activate a row when empty
If there are no artists, do not activate the first row.
Related #308
gnomemusic/views/artistsview.py | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index d79acc0e..76f928b6 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -122,6 +122,9 @@ class ArtistsView(BaseView):
def _on_artists_loaded(self, klass):
self._coremodel.disconnect(self._loaded_id)
first_row = self._sidebar.get_row_at_index(0)
+ if first_row is None:
+ return
+
self._sidebar.select_row(first_row)
first_row.emit("activate")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]