Skip to content

Commit

Permalink
Fix logic error introduced by coverity fix.
Browse files Browse the repository at this point in the history
Refs #11407
  • Loading branch information
martyngigg committed Mar 19, 2015
1 parent 0998a85 commit cbfa325
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Code/Mantid/MantidPlot/src/PlotDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1596,15 +1596,14 @@ void PlotDialog::updateTabWindow(QTreeWidgetItem *currentItem, QTreeWidgetItem *
if (currentItem->type() == CurveTreeItem::PlotCurveTreeItem)
{
CurveTreeItem *curveItem = dynamic_cast<CurveTreeItem *>(currentItem);
if (!curveItem)
if (!curveItem) {
boxPlotType->blockSignals(false);
return;
}

CurveTreeItem *pi = dynamic_cast<CurveTreeItem *>(previousItem);
if (!pi)
return;

if (previousItem->type() != CurveTreeItem::PlotCurveTreeItem
|| pi->plotItemType() != curveItem->plotItemType()
|| (pi && pi->plotItemType() != curveItem->plotItemType())
|| forceClearTabs)
{
clearTabWidget();
Expand Down

0 comments on commit cbfa325

Please sign in to comment.