Skip to content
Snippets Groups Projects
Unverified Commit aa93eb9b authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony Committed by GitHub
Browse files

Merge pull request #28463 from mantidproject/28436_indirect_workbench_slowdown

IndirectReduction GUI slowing processing on workbench when open.
parents 5a25bd92 12078826
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,9 @@ Indirect Geometry Changes
.. contents:: Table of Contents
:local:
.. warning:: **Developers:** Sort changes under appropriate heading
putting new features at the top of the section, followed by
improvements, followed by bug fixes.
Improvements
############
- An issue with IndirectDataReduction causing it to slow down processing when open has been resolved.
:ref:`Release 5.1.0 <v5.1.0>`
\ No newline at end of file
......@@ -68,11 +68,15 @@ void ContourPreviewPlot::onWorkspaceRemoved(
if (auto workspace =
boost::dynamic_pointer_cast<MatrixWorkspace>(nf->object())) {
// If the artist has already been removed, ignore.
bool workspaceRemoved = false;
try {
m_canvas->gca<MantidAxes>().removeWorkspaceArtists(workspace);
workspaceRemoved =
m_canvas->gca<MantidAxes>().removeWorkspaceArtists(workspace);
} catch (Mantid::PythonInterface::PythonException &) {
}
m_canvas->draw();
if (workspaceRemoved) {
m_canvas->draw();
}
}
}
......@@ -86,8 +90,9 @@ void ContourPreviewPlot::onWorkspaceReplaced(
boost::dynamic_pointer_cast<MatrixWorkspace>(nf->oldObject())) {
if (auto newWorkspace =
boost::dynamic_pointer_cast<MatrixWorkspace>(nf->newObject())) {
m_canvas->gca<MantidAxes>().replaceWorkspaceArtists(newWorkspace);
m_canvas->draw();
if (m_canvas->gca<MantidAxes>().replaceWorkspaceArtists(newWorkspace)) {
m_canvas->draw();
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment