Skip to content

Commit

Permalink
Refs #4826. More appropriate return for isDetectorMasked.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Feb 21, 2012
1 parent 330ce42 commit dfae42f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Code/Mantid/Framework/Geometry/src/Instrument/Detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ bool Detector::isMasked() const
if (m_isParametrized)
{
Parameter_sptr par = m_map->get(m_base,"masked");
return par ? true : false;
}
else
{
// If you get to here, instead of the Detector method, then it isn't masked
return false;
if (par)
return par->value<bool>();
}
// If you get to here, instead of the Detector method, then it isn't masked
return false;
}

/// Is the detector a monitor?
Expand Down

0 comments on commit dfae42f

Please sign in to comment.