Skip to content

Commit

Permalink
Re #6811. Forward call to AlgorithmManager's cancelAll method.
Browse files Browse the repository at this point in the history
This is better than pulling out the algorithm list and manipulating
things up the top.
  • Loading branch information
RussellTaylor committed Apr 1, 2013
1 parent 802dbf7 commit 9ae37a9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Code/Mantid/MantidPlot/src/Mantid/AlgorithmMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,8 @@ void AlgorithmMonitor::cancel(Mantid::API::AlgorithmID id)
/** Cancel all running algorithms */
void AlgorithmMonitor::cancelAll()
{
const std::deque<IAlgorithm_sptr>& algs = Mantid::API::AlgorithmManager::Instance().algorithms();
for(std::deque<IAlgorithm_sptr>::const_iterator a = algs.begin(); a != algs.end(); ++a)
{
if ( std::find(m_algorithms.begin(), m_algorithms.end(), (**a).getAlgorithmID()) != m_algorithms.end() )
{
(**a).cancel();
}
}
// Forward to the AlgorithmManager
AlgorithmManager::Instance().cancelAll();
}


Expand Down

0 comments on commit 9ae37a9

Please sign in to comment.