Skip to content

Commit

Permalink
dynamic_cast, setCurrentFont(), coverity issue 1075815, re #11152
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 22, 2015
1 parent b97348c commit 12a4cfa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Code/Mantid/MantidPlot/src/Graph.cpp
Expand Up @@ -5167,8 +5167,10 @@ void Graph::setCurrentFont(const QFont& f)
QList<QwtPlotItem *> curves = d_plot->curvesList();
foreach(QwtPlotItem *i, curves){
DataCurve* dc = dynamic_cast<DataCurve *>(i);
if(dc && i->rtti() != QwtPlotItem::Rtti_PlotSpectrogram &&
dynamic_cast<PlotCurve*>(i)->type() != Graph::Function){
PlotCurve* pc = dynamic_cast<PlotCurve*>(i);
if(pc && dc
&& i->rtti() != QwtPlotItem::Rtti_PlotSpectrogram &&
pc->type() != Graph::Function){
if(dc->hasSelectedLabels()){
dc->setLabelsFont(f);
d_plot->replot();
Expand Down

0 comments on commit 12a4cfa

Please sign in to comment.