From f8f43eed4c5a1feb5d1fe3eaae3e695c71a1bbb9 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sun, 31 May 2020 18:55:36 +0100 Subject: [PATCH] Fir set RPE from Overview Regression .. updating the RPE value via the RPE widget on the overview was lost in the last commit, this fix reinstates it. --- src/Charts/OverviewItems.cpp | 2 +- src/Gui/ChartSpace.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Charts/OverviewItems.cpp b/src/Charts/OverviewItems.cpp index 2242b4187..b5e86cc07 100644 --- a/src/Charts/OverviewItems.cpp +++ b/src/Charts/OverviewItems.cpp @@ -1334,7 +1334,7 @@ void RPErating::applyEdit() { // update the item - if we have one - RideItem *item = parent->parent->property("ride").value(); + RideItem *item = parent->parent->current; // did it change? if (item && item->ride() && item->getText("RPE","") != value) { diff --git a/src/Gui/ChartSpace.h b/src/Gui/ChartSpace.h index a2757bdd3..37f0d4bc7 100644 --- a/src/Gui/ChartSpace.h +++ b/src/Gui/ChartSpace.h @@ -135,6 +135,9 @@ class ChartSpace : public QWidget QGraphicsView *view; QFont titlefont, bigfont, midfont, smallfont; + // the item we are currently showing + RideItem *current; + // to get paint device QGraphicsView *device() { return view; } const QList allItems() { return items; } @@ -231,7 +234,6 @@ class ChartSpace : public QWidget bool stale; bool configured; - RideItem *current; }; #endif // _GC_ChartSpace_h