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.
This commit is contained in:
Mark Liversedge
2013-03-22 19:36:17 +00:00
parent 71b51cda2b
commit 9db0502949

View File

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