mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
DiaryWindow::rideSelected - Ignore same activity
This method is called every time the chart is activated and this change is intended to preserve the chart status since the user could have navigated to a different date. [publish binaries][skip travis]
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include "HelpWhatsThis.h"
|
||||
|
||||
DiaryWindow::DiaryWindow(Context *context) :
|
||||
GcChartWindow(context), context(context), active(false)
|
||||
GcChartWindow(context), ride(nullptr), context(context), active(false)
|
||||
{
|
||||
setControls(NULL);
|
||||
|
||||
@@ -142,11 +142,12 @@ DiaryWindow::setDefaultView(int view)
|
||||
void
|
||||
DiaryWindow::rideSelected()
|
||||
{
|
||||
if (active) {
|
||||
// ignore if already active or the selected activity has not changed
|
||||
if (active || ride == myRideItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
RideItem *ride = myRideItem;
|
||||
ride = myRideItem;
|
||||
|
||||
// ignore if not active or null ride
|
||||
if (!ride) {
|
||||
|
||||
@@ -61,6 +61,7 @@ class DiaryWindow : public GcChartWindow
|
||||
|
||||
protected:
|
||||
Context *context;
|
||||
RideItem *ride;
|
||||
|
||||
QDateEdit *title;
|
||||
QPushButton *prev, *next;
|
||||
|
||||
Reference in New Issue
Block a user