[gnome-music/wip/jfelder/3-38-playlist-deletion] playlistcontrols: Fix playlist deletion
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/3-38-playlist-deletion] playlistcontrols: Fix playlist deletion
- Date: Fri, 18 Dec 2020 14:22:23 +0000 (UTC)
commit b8157e11d86d038ebbbc5899e6242411074209e8
Author: Jean Felder <jfelder src gnome org>
Date: Fri Dec 18 14:41:04 2020 +0100
playlistcontrols: Fix playlist deletion
CoreModel used to have a property named active_playlist to keep track
of the playlist being played. This property has been superseded by the
active_core_object property which keeps track of the object being
played (playlist, artist, song or album). However, the delete_action
from PlaylistCreation was not updated to use active_core_object. This
results in a crash when a playlist is deleted.
This issue is fixed by replacing active_playlist with
active_core_object.
Fixes: 2aaa6e61a22ca4a33372c3e42f8c20ea4ecc36e7
gnomemusic/widgets/playlistcontrols.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/widgets/playlistcontrols.py b/gnomemusic/widgets/playlistcontrols.py
index c406c18fc..f06b5cfd5 100644
--- a/gnomemusic/widgets/playlistcontrols.py
+++ b/gnomemusic/widgets/playlistcontrols.py
@@ -91,9 +91,9 @@ class PlaylistControls(Gtk.Grid):
self._window.add_action(self._rename_action)
def _on_delete_action(self, menutime, data=None):
- active_playlist = self._coremodel.props.active_playlist
- if (active_playlist is not None
- and active_playlist == self.props.playlist):
+ active_core_object = self._coremodel.props.active_core_object
+ if (active_core_object is not None
+ and active_core_object == self.props.playlist):
self._player.stop()
self._window.set_player_visible(False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]