Skip to content

Commit

Permalink
Refs #4663. When resetting the curve, remove changing its style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Whitley committed Jan 27, 2012
1 parent 5095818 commit bc5a691
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Code/Mantid/MantidPlot/src/Mantid/MantidMatrixCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,21 +251,15 @@ void MantidMatrixCurve::dataReset(const QString& wsName)

if (!mws) return;
const MantidQwtMatrixWorkspaceData * new_mantidData(NULL);
try {
try
{
new_mantidData = mantidData()->copy(mws);
setData(*new_mantidData);
if (mws->isHistogramData())
{
setStyle(QwtPlotCurve::Steps);
setCurveAttribute(Inverted,true);// this is the Steps style modifier that makes horizontal steps
}
else
{
setStyle(QwtPlotCurve::Lines);
}
// Queue this plot to be updated once all MantidQwtMatrixWorkspaceData objects for this workspace have been
emit dataUpdated();
} catch(std::range_error &) {
}
catch(std::range_error &)
{
// Get here if the new workspace has fewer spectra and the plotted one no longer exists
Mantid::Kernel::Logger::get("MantidMatrixCurve").information() << "Workspace " << wsNameStd
<< " now has fewer spectra - plotted curve(s) deleted\n";
Expand Down

0 comments on commit bc5a691

Please sign in to comment.