From c70900dd854dd8b8777edb0ccd479e311c957aeb Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Aug 2018 12:48:11 +0200 Subject: Fixed daylongeventmodel Invalidating the filter is not enough, because for events that overlap weeks the filter still applies, but the position of the event changes. invalidate() seems to be enough though. --- framework/src/domain/daylongeventmodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/src/domain/daylongeventmodel.cpp b/framework/src/domain/daylongeventmodel.cpp index cb9769c6..044f9e02 100644 --- a/framework/src/domain/daylongeventmodel.cpp +++ b/framework/src/domain/daylongeventmodel.cpp @@ -107,8 +107,8 @@ bool DayLongEventModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourc return false; } - auto eventStart = event->getStartTime().date(); - auto eventEnd = event->getEndTime().date(); + const auto eventStart = event->getStartTime().date(); + const auto eventEnd = event->getEndTime().date(); if (!eventStart.isValid() || !eventEnd.isValid()) { SinkWarning() << "Invalid date in the event model, ignoring..."; @@ -131,7 +131,7 @@ void DayLongEventModel::setPeriodStart(const QDate &start) } mPeriodStart = start; - invalidateFilter(); + invalidate(); } void DayLongEventModel::setPeriodStart(const QVariant &start) @@ -147,7 +147,7 @@ int DayLongEventModel::periodLength() const void DayLongEventModel::setPeriodLength(int length) { mPeriodLength = length; - invalidateFilter(); + invalidate(); } QSet DayLongEventModel::calendarFilter() const -- cgit v1.2.3