From d9f92943b514d8ee5a2c1cb72748f386bea48ca4 Mon Sep 17 00:00:00 2001 From: Simon Heybrock <simon.heybrock@esss.se> Date: Wed, 3 Feb 2016 11:35:54 +0100 Subject: [PATCH] Re #15156 Fixed ScaleX sign determination for EventWorkspace. --- Framework/Algorithms/src/ScaleX.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Framework/Algorithms/src/ScaleX.cpp b/Framework/Algorithms/src/ScaleX.cpp index d0ea8c9c6f4..b6a9e6e3d11 100644 --- a/Framework/Algorithms/src/ScaleX.cpp +++ b/Framework/Algorithms/src/ScaleX.cpp @@ -199,13 +199,14 @@ void ScaleX::execEvent() { PARALLEL_START_INTERUPT_REGION // Do the offsetting if ((i >= m_wi_min) && (i <= m_wi_max)) { + auto factor = getScaleFactor(inputWS, i); if (op == "Multiply") { - outputWS->getEventList(i).scaleTof(getScaleFactor(inputWS, i)); - if (m_algFactor < 0) { + outputWS->getEventList(i).scaleTof(factor); + if (factor < 0) { outputWS->getEventList(i).reverse(); } } else if (op == "Add") { - outputWS->getEventList(i).addTof(getScaleFactor(inputWS, i)); + outputWS->getEventList(i).addTof(factor); } } m_progress->report("Scaling X"); -- GitLab