Skip to content

Commit

Permalink
dynamic_cast, deselectCurves(), coverity issue 1075816, re #11152
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 22, 2015
1 parent aeb335a commit b97348c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Code/Mantid/MantidPlot/src/Graph.cpp
Expand Up @@ -1675,11 +1675,13 @@ void Graph::deselectCurves()
foreach(QwtPlotItem *i, curves){
PlotCurve *c = dynamic_cast<PlotCurve *>(i);
DataCurve *dc = dynamic_cast<DataCurve *>(i);
if(dc && i->rtti() != QwtPlotItem::Rtti_PlotSpectrogram &&
c->type() != Graph::Function && dc->hasSelectedLabels() ){
dc->setLabelsSelected(false);
return;
}
if(c && dc &&
i->rtti() != QwtPlotItem::Rtti_PlotSpectrogram &&
c->type() != Graph::Function && dc->hasSelectedLabels() )
{
dc->setLabelsSelected(false);
return;
}
}
}

Expand Down

0 comments on commit b97348c

Please sign in to comment.