Skip to content

Commit

Permalink
Refs #5421 Swapped to using MantidQwtMatrixWorkspaceData
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Sep 27, 2013
1 parent bcdddf6 commit 5e46074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "MantidAPI/MatrixWorkspace.h"
#include "MantidQtMantidWidgets/RangeSelector.h"
#include "MantidQtAPI/MantidQwtMatrixWorkspaceData.h"

#include <QMap>
#include <QDoubleValidator>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidQtAPI/MantidQwtMatrixWorkspaceData.h"
#include "MantidQtAPI/UserSubWindow.h"
#include "MantidQtCustomInterfaces/IndirectBayesTab.h"

Expand Down Expand Up @@ -83,6 +84,8 @@ namespace MantidQt
{
using Mantid::MantidVec;

MantidQwtMatrixWorkspaceData wsData(workspace, static_cast<int>(wsIndex), false);

if ( m_curve != NULL )
{
m_curve->attach(0);
Expand All @@ -97,11 +100,8 @@ namespace MantidQt
}
else
{
auto dataX = workspace->readX(wsIndex);
auto dataY = workspace->readY(wsIndex);

m_curve = new QwtPlotCurve();
m_curve->setData(&dataX[0], &dataY[0], static_cast<int>(workspace->blocksize()));
m_curve->setData(wsData);
m_curve->attach(m_plot);

m_plot->replot();
Expand Down

0 comments on commit 5e46074

Please sign in to comment.