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