Skip to content
Snippets Groups Projects
Commit 4e116881 authored by Roman Tolchenov's avatar Roman Tolchenov
Browse files

Re #11406. Check for a null pointer.

parent e7c4a60c
No related merge requests found
...@@ -2732,18 +2732,21 @@ void MantidUI::importNumSeriesLog(const QString &wsName, const QString &logName, ...@@ -2732,18 +2732,21 @@ void MantidUI::importNumSeriesLog(const QString &wsName, const QString &logName,
if (filter && flt.filter()) if (filter && flt.filter())
{ {
QwtPlotCurve *c = g->curve(iFilterCurve); QwtPlotCurve *c = g->curve(iFilterCurve);
// Set the right axis as Y axis for the filter curve. if ( c )
c->setAxis(2,1); {
// Set style #3 (HorizontalSteps) for curve 1 // Set the right axis as Y axis for the filter curve.
// Set scale of right Y-axis (#3) from 0 to 1 c->setAxis(2,1);
g->setCurveStyle(iFilterCurve,3); // Set style #3 (HorizontalSteps) for curve 1
g->setScale(3,0,1); // Set scale of right Y-axis (#3) from 0 to 1
// Fill area under the curve with a pattern g->setCurveStyle(iFilterCurve,3);
QBrush br = QBrush(Qt::gray, Qt::Dense5Pattern); g->setScale(3,0,1);
g->setCurveBrush(iFilterCurve, br); // Fill area under the curve with a pattern
// Set line colour QBrush br = QBrush(Qt::gray, Qt::Dense5Pattern);
QPen pn = QPen(Qt::gray); g->setCurveBrush(iFilterCurve, br);
g->setCurvePen(iFilterCurve, pn); // Set line colour
QPen pn = QPen(Qt::gray);
g->setCurvePen(iFilterCurve, pn);
}
} }
g->setXAxisTitle(t->colLabel(0)); g->setXAxisTitle(t->colLabel(0));
g->setYAxisTitle(t->colLabel(1).section(".",0,0)); g->setYAxisTitle(t->colLabel(1).section(".",0,0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment