Skip to content

Commit

Permalink
dynamic_cast, deselectMarker(), coverity issue 1075814, re #11152
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 22, 2015
1 parent 12a4cfa commit 745fad9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Code/Mantid/MantidPlot/src/Graph.cpp
Expand Up @@ -238,9 +238,12 @@ void Graph::deselectMarker()
cp->disableEditing();

QObjectList lst = d_plot->children();
foreach(QObject *o, lst){
if (o->inherits("LegendWidget"))
dynamic_cast<LegendWidget *>(o)->setSelected(false);
foreach(QObject *o, lst) {
if (o->inherits("LegendWidget")) {
LegendWidget *lw = dynamic_cast<LegendWidget *>(o);
if (lw)
lw->setSelected(false);
}
}
}

Expand Down

0 comments on commit 745fad9

Please sign in to comment.