Skip to content
Permalink
Browse files

Fix restoration of painter antialiasing after rendering lines

  • Loading branch information
nyalldawson committed Jul 24, 2020
1 parent 1f6e1b1 commit 4bfa75af50ae156eca8f29a219319f373ff01122
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/core/symbology/qgslinesymbollayer.cpp
@@ -337,7 +337,6 @@ void QgsSimpleLineSymbolLayer::renderPolyline( const QPolygonF &points, QgsSymbo
const QPen pen = context.selected() ? mSelPen : mPen;
p->setBrush( Qt::NoBrush );

const bool antialiasingWasEnabled = p->testRenderHint( QPainter::Antialiasing );
// Disable 'Antialiasing' if the geometry was generalized in the current RenderContext (We known that it must have least #2 points).
if ( points.size() <= 2 &&
( context.renderContext().vectorSimplifyMethod().simplifyHints() & QgsVectorSimplifyMethod::AntialiasingSimplification ) &&
@@ -393,7 +392,7 @@ void QgsSimpleLineSymbolLayer::renderPolyline( const QPolygonF &points, QgsSymbo
}
}

p->setRenderHint( QPainter::Antialiasing, antialiasingWasEnabled );
p->setRenderHint( QPainter::Antialiasing, context.renderContext().testFlag( QgsRenderContext::Antialiasing ) );
}

QgsStringMap QgsSimpleLineSymbolLayer::properties() const

0 comments on commit 4bfa75a

Please sign in to comment.
You can’t perform that action at this time.