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.
This commit is contained in:
Bart De Vries 2022-12-14 16:51:55 +01:00
parent 906730c516
commit 44c54b664a
2 changed files with 4 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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
}
}
}