Skip to content

Commit

Permalink
Refs #11677 Destroy peak filter correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonPiccardoSelg committed May 6, 2015
1 parent 4c34b2f commit 4a86c2d
Showing 1 changed file with 1 addition and 7 deletions.
Expand Up @@ -18,7 +18,6 @@
#include <pqActiveObjects.h>
#include <pqApplicationCore.h>
#include <pqDataRepresentation.h>
#include <pqDeleteReaction.h>
#include <pqObjectBuilder.h>
#include <pqPipelineRepresentation.h>
#include <pqPipelineSource.h>
Expand Down Expand Up @@ -365,18 +364,14 @@ void SplatterPlotView::destroyPeakSources()
QList<pqPipelineSource *>::Iterator source;
sources = smModel->findItems<pqPipelineSource *>(server);

//QSet<pqPipelineSource*> toDelete;
for (source = sources.begin(); source != sources.end(); ++source)
{
if (this->isPeaksWorkspace(*source))
{
//toDelete.insert(*source);
builder->destroy(*source);
}
}

//pqDeleteReaction::deleteSources(toDelete);

this->peaksSource.clear();
}

Expand Down Expand Up @@ -637,8 +632,7 @@ void SplatterPlotView::updatePeaksFilter(pqPipelineSource* filter) {

// If there are no peaks, then destroy the filter, else update it.
if (peaksSource.isEmpty()) {
pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder();
builder->destroy(filter);
this->destroyFilter(QString("MDPeaksFilter"));
}
else {
std::string workspaceNamesConcatentated = m_peaksTableController->getConcatenatedWorkspaceNames(m_peaksWorkspaceNameDelimiter);
Expand Down

0 comments on commit 4a86c2d

Please sign in to comment.