[gnome-music/wip/jfelder/artistview-fixes: 7/8] artistalbumwidget: Correctly set discbox properties
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/artistview-fixes: 7/8] artistalbumwidget: Correctly set discbox properties
- Date: Thu, 12 Sep 2019 14:01:45 +0000 (UTC)
commit 0b20401ae51ccd62c62325b2f7adb1c4616b66d6
Author: Jean Felder <jfelder src gnome org>
Date: Tue Sep 10 13:58:23 2019 +0200
artistalbumwidget: Correctly set discbox properties
If the model has already been loaded (if the artist has already been
selected from ArtistsView), _on_model_items_changed method will never
be called. Therefore, the properties associated with each
DiscBox (selectable and show_disc_label) will not be set correctly.
Fix the issue by manually calling items_changed in the constructor.
Closes: #300
gnomemusic/widgets/artistalbumwidget.py | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gnomemusic/widgets/artistalbumwidget.py b/gnomemusic/widgets/artistalbumwidget.py
index e2b9372e..ea3df015 100644
--- a/gnomemusic/widgets/artistalbumwidget.py
+++ b/gnomemusic/widgets/artistalbumwidget.py
@@ -89,6 +89,8 @@ class ArtistAlbumWidget(Gtk.Box):
self._disc_list_box.bind_model(
corealbum.props.model, self._create_widget)
+ corealbum.props.model.items_changed(0, 0, 0)
+
def _create_widget(self, disc):
disc_box = self._create_disc_box(disc.props.disc_nr, disc.model)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]