diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-20 12:48:11 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-20 12:48:11 +0200 |
commit | c70900dd854dd8b8777edb0ccd479e311c957aeb (patch) | |
tree | 772729eff3d96d9718f04b07530d05bc487f28bf | |
parent | acf06ac2e3a8c30f1efa4e83b2fa9db3ec9b1f70 (diff) | |
download | kube-c70900dd854dd8b8777edb0ccd479e311c957aeb.tar.gz kube-c70900dd854dd8b8777edb0ccd479e311c957aeb.zip |
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.
-rw-r--r-- | framework/src/domain/daylongeventmodel.cpp | 8 |
1 files 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 | |||
107 | return false; | 107 | return false; |
108 | } | 108 | } |
109 | 109 | ||
110 | auto eventStart = event->getStartTime().date(); | 110 | const auto eventStart = event->getStartTime().date(); |
111 | auto eventEnd = event->getEndTime().date(); | 111 | const auto eventEnd = event->getEndTime().date(); |
112 | 112 | ||
113 | if (!eventStart.isValid() || !eventEnd.isValid()) { | 113 | if (!eventStart.isValid() || !eventEnd.isValid()) { |
114 | SinkWarning() << "Invalid date in the event model, ignoring..."; | 114 | SinkWarning() << "Invalid date in the event model, ignoring..."; |
@@ -131,7 +131,7 @@ void DayLongEventModel::setPeriodStart(const QDate &start) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | mPeriodStart = start; | 133 | mPeriodStart = start; |
134 | invalidateFilter(); | 134 | invalidate(); |
135 | } | 135 | } |
136 | 136 | ||
137 | void DayLongEventModel::setPeriodStart(const QVariant &start) | 137 | void DayLongEventModel::setPeriodStart(const QVariant &start) |
@@ -147,7 +147,7 @@ int DayLongEventModel::periodLength() const | |||
147 | void DayLongEventModel::setPeriodLength(int length) | 147 | void DayLongEventModel::setPeriodLength(int length) |
148 | { | 148 | { |
149 | mPeriodLength = length; | 149 | mPeriodLength = length; |
150 | invalidateFilter(); | 150 | invalidate(); |
151 | } | 151 | } |
152 | 152 | ||
153 | QSet<QByteArray> DayLongEventModel::calendarFilter() const | 153 | QSet<QByteArray> DayLongEventModel::calendarFilter() const |