From 3a9620a3d9ed86ca1e9ebed2ed81950ef21209fd Mon Sep 17 00:00:00 2001 From: Paul Johnson Date: Thu, 28 Apr 2022 16:55:39 +0100 Subject: [PATCH] Pass ride context to Python DPs when available (#4214) Partial fix for #4095 - Python DPs now work in automatic mode using the run on save option. --- src/FileIO/FixPyDataProcessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FileIO/FixPyDataProcessor.cpp b/src/FileIO/FixPyDataProcessor.cpp index d526b44ee..b965cefbe 100644 --- a/src/FileIO/FixPyDataProcessor.cpp +++ b/src/FileIO/FixPyDataProcessor.cpp @@ -23,7 +23,8 @@ bool FixPyDataProcessor::postProcess(RideFile *rideFile, DataProcessorConfig *se QString errText; bool useNewThread = op != "PYTHON"; - FixPyRunner pyRunner(nullptr, rideFile, useNewThread); + Context* context = (rideFile) ? rideFile->context : nullptr; + FixPyRunner pyRunner(context, rideFile, useNewThread); return pyRunner.run(pyScript->source, pyScript->iniKey, errText) == 0; }