https://bugs.kde.org/show_bug.cgi?id=381511

            Bug ID: 381511
           Summary: GeoDataLineString::setTessellate function fails to
                    unset tessellation.
           Product: marble
           Version: unspecified
          Platform: MS Windows
                OS: MS Windows
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: marble-b...@kde.org
          Reporter: dadamson.dumping.gro...@gmail.com
  Target Milestone: ---

When you pass in false into the function GeoDataLineString::setTessellate in
GeoDataLineString.cpp lines 478-493, it can actually set tessellation on
instead of off. This happens because the function is using a xor operator when
it should be using an and operator. See below:

    if ( tessellate ) {
        p()->m_tessellationFlags |= Tessellate;
        p()->m_tessellationFlags |= RespectLatitudeCircle;
    } else {
        p()->m_tessellationFlags ^= Tessellate;
        p()->m_tessellationFlags ^= RespectLatitudeCircle;
    }

The above should really be the following:

    if ( tessellate ) {
        p()->m_tessellationFlags |= (Tessellate | RespectLatitudeCircle);
    } else {
        p()->m_tessellationFlags &= ~(Tessellate | RespectLatitudeCircle);
    }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to