From c03433340098d2a3c7c5715d80a5b72f63316dbf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 13 Jun 2011 08:52:11 +0000 Subject: [PATCH] From Jeremy Moles, fixed style == operator. --- src/osgText/Style.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/osgText/Style.cpp b/src/osgText/Style.cpp index fffd71c4b..f498f0b74 100644 --- a/src/osgText/Style.cpp +++ b/src/osgText/Style.cpp @@ -27,7 +27,8 @@ Bevel::Bevel() flatBevel(); } -Bevel::Bevel(const Bevel& bevel, const osg::CopyOp&): +Bevel::Bevel(const Bevel& bevel, const osg::CopyOp& copyop): + osg::Object(bevel, copyop), _thickness(bevel._thickness), _vertices(bevel._vertices) { @@ -155,12 +156,15 @@ bool Style::operator == (const Style& rhs) const if (!(*_bevel == *rhs._bevel)) return false; } - if (rhs._bevel.valid()) return false; + else + { + if (rhs._bevel.valid()) return false; + } if (_widthRatio != rhs._widthRatio) return false; if (_thicknessRatio != rhs._thicknessRatio) return false; if (_outlineRatio != rhs._outlineRatio) return false; if (_sampleDensity != rhs._sampleDensity) return false; - return false; + return true; }