From dfb398dd810df62198e2f1bfb94cdfdb10f733dd Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sun, 17 Jan 2016 19:31:48 +0000 Subject: [PATCH] Workout Editor Notify Plots when ErgFile Upated .. so other plots see changes we made (without saving). .. the reason we don't insist on saving the erg file is because we often increase intensity or repeat sections just for a one off run. --- src/WorkoutWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/WorkoutWidget.cpp b/src/WorkoutWidget.cpp index d5bb789f7..250063832 100644 --- a/src/WorkoutWidget.cpp +++ b/src/WorkoutWidget.cpp @@ -105,10 +105,15 @@ WorkoutWidget::start() // if we have edited the erg we need to update the in-memory points if (ergFile && stack.count()) { + + // replace all the points ergFile->Points.clear(); foreach(WWPoint *p, points_) { ergFile->Points.append(ErgFilePoint(p->x * 1000, p->y, p->y)); } + + // force any other plots to take the changes + context->notifyErgFileSelected(ergFile); } // clear previous data