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"
|
#include "HelpWhatsThis.h"
|
||||||
|
|
||||||
DiaryWindow::DiaryWindow(Context *context) :
|
DiaryWindow::DiaryWindow(Context *context) :
|
||||||
GcChartWindow(context), context(context), active(false)
|
GcChartWindow(context), ride(nullptr), context(context), active(false)
|
||||||
{
|
{
|
||||||
setControls(NULL);
|
setControls(NULL);
|
||||||
|
|
||||||
@@ -142,11 +142,12 @@ DiaryWindow::setDefaultView(int view)
|
|||||||
void
|
void
|
||||||
DiaryWindow::rideSelected()
|
DiaryWindow::rideSelected()
|
||||||
{
|
{
|
||||||
if (active) {
|
// ignore if already active or the selected activity has not changed
|
||||||
|
if (active || ride == myRideItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RideItem *ride = myRideItem;
|
ride = myRideItem;
|
||||||
|
|
||||||
// ignore if not active or null ride
|
// ignore if not active or null ride
|
||||||
if (!ride) {
|
if (!ride) {
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class DiaryWindow : public GcChartWindow
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
Context *context;
|
Context *context;
|
||||||
|
RideItem *ride;
|
||||||
|
|
||||||
QDateEdit *title;
|
QDateEdit *title;
|
||||||
QPushButton *prev, *next;
|
QPushButton *prev, *next;
|
||||||
|
|||||||
Reference in New Issue
Block a user