Fixed sort of sources so that the layer number is taken into account.

This commit is contained in:
Robert Osfield
2005-04-07 10:55:17 +00:00
parent 88d65263ec
commit 83e21611f6

View File

@@ -3842,7 +3842,10 @@ struct DerefLessFunctor
{
bool operator () (const T& lhs, const T& rhs)
{
return (lhs.valid() && rhs.valid()) && (lhs->getSortValue() > rhs->getSortValue());
if (!lhs || !rhs) return lhs<rhs;
if (lhs->getLayer() < rhs->getLayer()) return true;
if (rhs->getLayer() < lhs->getLayer()) return false;
return (lhs->getSortValue() > rhs->getSortValue());
}
};