From 44c54b664a3818de648bd356ff2a684c82ffe9a0 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Wed, 14 Dec 2022 16:51:55 +0100 Subject: [PATCH] Pass null as entry to chaptermodel if there is no current track It previously passed undefined, but that will not be interpreted as nullptr by the underlying C++ model. --- src/qml/HeaderBar.qml | 4 ++-- src/qml/PlayerControls.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qml/HeaderBar.qml b/src/qml/HeaderBar.qml index 4e41e420..b7e85758 100644 --- a/src/qml/HeaderBar.qml +++ b/src/qml/HeaderBar.qml @@ -279,12 +279,12 @@ Rectangle { id: chapterList model: ChapterModel { id: chapterModel - entry: AudioManager.entry ? AudioManager.entry : undefined + entry: AudioManager.entry ? AudioManager.entry : null } delegate: ChapterListDelegate { id: chapterDelegate width: chapterList.width - entry: AudioManager.entry + entry: AudioManager.entry ? AudioManager.entry : null overlay: chapterOverlay } } diff --git a/src/qml/PlayerControls.qml b/src/qml/PlayerControls.qml index 89c19995..2f844669 100644 --- a/src/qml/PlayerControls.qml +++ b/src/qml/PlayerControls.qml @@ -212,13 +212,13 @@ Kirigami.Page { id: chapterList model: ChapterModel { id: chapterModel - entry: AudioManager.entry ? AudioManager.entry : undefined + entry: AudioManager.entry ? AudioManager.entry : null } clip: true visible: chapterList.count !== 0 anchors.fill: parent delegate: ChapterListDelegate { - entry: AudioManager.entry + entry: AudioManager.entry ? AudioManager.entry : null } } }