From f35472bc9942be18f03e88af90151968796b932f Mon Sep 17 00:00:00 2001 From: Nick Draper <nick.draper@stfc.ac.uk> Date: Tue, 12 Nov 2013 09:06:23 +0000 Subject: [PATCH] re #8418 resolve a couple of errors --- Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp | 5 ++--- Code/Mantid/MantidPlot/src/PlotCurve.cpp | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp b/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp index ab8fc7ea02c..6d9c4a98f78 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp @@ -1580,13 +1580,12 @@ bool MantidUI::hasUB(const QString& wsName) Mantid::API::IAlgorithm_sptr alg; try { - const int version = -1; + alg = Mantid::API::AlgorithmManager::Instance().create(algName); } catch (...) { QMessageBox::critical(appWindow(), "MantidPlot - Algorithm error", - "Cannot create algorithm " + QString::fromStdString(algName) + " version " - + QString::number(version)); + "Cannot create algorithm " + QString::fromStdString(algName) ); return false; } if (!alg) diff --git a/Code/Mantid/MantidPlot/src/PlotCurve.cpp b/Code/Mantid/MantidPlot/src/PlotCurve.cpp index 4786b4e50a8..b49b9d1be64 100644 --- a/Code/Mantid/MantidPlot/src/PlotCurve.cpp +++ b/Code/Mantid/MantidPlot/src/PlotCurve.cpp @@ -30,6 +30,7 @@ #include "Grid.h" #include "ScaleDraw.h" #include "SymbolBox.h" +#include "Graph.h" #include "PatternBox.h" #include "plot2D/ScaleEngine.h" #include "Mantid/ErrorBarSettings.h" @@ -52,7 +53,7 @@ PlotCurve::PlotCurve(const PlotCurve& c) : QObject(), QwtPlotCurve(c.title().tex QString PlotCurve::saveCurveLayout() { Plot *plot = static_cast<Plot *>(this->plot()); - Graph *g = static_cast<Graph *>(plot->parent(); + Graph *g = static_cast<Graph *>(plot->parent()); int index = g->curveIndex(static_cast<QwtPlotCurve *>(this)); int style = g->curveType(index); @@ -550,7 +551,7 @@ void DataCurve::loadData() } if (!d_labels_list.isEmpty()){ - (static_cast<Graph*>(*plot->parent()))->updatePlot(); + (static_cast<Graph*>(plot->parent()))->updatePlot(); loadLabels(); } } -- GitLab