From 9db0502949b1385e00a458c2b38d30a184467767 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Fri, 22 Mar 2013 19:36:17 +0000 Subject: [PATCH] Fix multicalendar repaint bug After taking out the double refresh in the previous commit we got a bug with the last selected date stating highlighted when clicking on the left and right buttons. Fixed by signalling date changes after the model has been queried. Still lots faster than before. --- src/GcCalendar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GcCalendar.cpp b/src/GcCalendar.cpp index 69e56d44d..13ef1bbc7 100644 --- a/src/GcCalendar.cpp +++ b/src/GcCalendar.cpp @@ -635,7 +635,6 @@ GcMiniCalendar::previous() month = date.month(); year = date.year(); calendarModel->setMonth(date.month(), date.year()); - emit dateChanged(month,year); // find the day in the calendar... for (int day=42; day>0;day--) { @@ -648,6 +647,7 @@ GcMiniCalendar::previous() if (files.count()) main->selectRideFile(QFileInfo(files[0]).fileName()); } } + emit dateChanged(month,year); break; } } @@ -668,7 +668,6 @@ GcMiniCalendar::next() month = date.month(); year = date.year(); calendarModel->setMonth(date.month(), date.year()); - emit dateChanged(month,year); // find the day in the calendar... for (int day=0; day<42;day++) { @@ -681,6 +680,7 @@ GcMiniCalendar::next() if (files.count()) main->selectRideFile(QFileInfo(files[0]).fileName()); } } + emit dateChanged(month,year); break; } }