Fix events appearing in year or decade view
Bug is probably caused by using a DelegateModel on a simple ListModel. Make sure we don't even try to load the event delegate when there is no events or it's not a DayModel BUG: 436999
This commit is contained in:
parent
a9372fb6ac
commit
9a8613612f
|
@ -70,20 +70,23 @@ PlasmaComponents3.AbstractButton {
|
|||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: PlasmaCore.Units.smallSpacing
|
||||
Loader {
|
||||
active: model.eventCount !== undefined && model.eventCount > 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: PlasmaCore.Units.smallSpacing
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Repeater {
|
||||
model: DelegateModel {
|
||||
model: dayStyle.dayModel
|
||||
rootIndex: modelIndex(index)
|
||||
delegate: Rectangle {
|
||||
width: PlasmaCore.Units.smallSpacing * 1.5
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: eventColor || PlasmaCore.Theme.highlightColor
|
||||
sourceComponent: Row {
|
||||
spacing: PlasmaCore.Units.smallSpacing
|
||||
Repeater {
|
||||
model: DelegateModel {
|
||||
model: dayStyle.dayModel
|
||||
rootIndex: modelIndex(index)
|
||||
delegate: Rectangle {
|
||||
width: PlasmaCore.Units.smallSpacing * 1.5
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: eventColor || PlasmaCore.Theme.highlightColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user