Skip to content

Commit

Permalink
Re #5704. Units should be matched by name, not by pointer.
Browse files Browse the repository at this point in the history
A given unit type used to always be the same object, but that's no
longer the case.
  • Loading branch information
RussellTaylor committed Aug 8, 2012
1 parent 00b500a commit 03a5a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3356,7 +3356,7 @@ PlotCurve* Graph::insertCurve(PlotCurve* c, int lineWidth, int curveType)
m_yUnits = mc->yUnits();
m_isDistribution = mc->isDistribution();
}
if ( m_xUnits != mc->xUnits() || m_yUnits != mc->yUnits() )
if ( m_xUnits->unitID() != mc->xUnits()->unitID() || m_yUnits->unitID() != mc->yUnits()->unitID() )
{
g_log.warning("You are overlaying plots from data having differing units!");
}
Expand Down

0 comments on commit 03a5a4c

Please sign in to comment.