Skip to content
Permalink
Browse files

fix issues from Nyall review

  • Loading branch information
PeterPetrik committed Sep 24, 2018
1 parent 1b82abf commit 9c1dc79b43f9fe63ab23b32e01fd7451d9fd4ba2
@@ -244,7 +244,6 @@ void QgsMeshLayerRenderer::renderMesh( const QgsMeshRendererMeshSettings &settin
if ( mContext.flags() & QgsRenderContext::Antialiasing )
painter->setRenderHint( QPainter::Antialiasing, true );

painter->setRenderHint( QPainter::Antialiasing );
QPen pen = painter->pen();
pen.setCapStyle( Qt::FlatCap );
pen.setJoinStyle( Qt::MiterJoin );
@@ -81,7 +81,6 @@ void QgsMeshVectorRenderer::draw()
if ( mContext.flags() & QgsRenderContext::Antialiasing )
painter->setRenderHint( QPainter::Antialiasing, true );

painter->setRenderHint( QPainter::Antialiasing );
QPen pen = painter->pen();
pen.setCapStyle( Qt::FlatCap );
pen.setJoinStyle( Qt::MiterJoin );
@@ -26,6 +26,7 @@
#include "qgsgeometry.h"
#include "qgsrectangle.h"
#include "qgsfeatureiterator.h"
#include "qgslogger.h"

///@cond PRIVATE

@@ -133,11 +134,20 @@ void QgsTriangularMesh::update( QgsMesh *nativeMesh, QgsRenderContext *context )
const QgsMeshVertex &vertex = nativeMesh->vertices.at( i );
if ( mCoordinateTransform.isValid() )
{
QgsPointXY mapPoint = mCoordinateTransform.transform( QgsPointXY( vertex.x(), vertex.y() ) );
QgsMeshVertex mapVertex( mapPoint );
mapVertex.setZ( vertex.z() );
mapVertex.setM( vertex.m() );
mTriangularMesh.vertices[i] = mapVertex;
try
{
QgsPointXY mapPoint = mCoordinateTransform.transform( QgsPointXY( vertex.x(), vertex.y() ) );
QgsMeshVertex mapVertex( mapPoint );
mapVertex.setZ( vertex.z() );
mapVertex.setM( vertex.m() );
mTriangularMesh.vertices[i] = mapVertex;
}
catch ( QgsCsException &cse )
{
Q_UNUSED( cse );
QgsDebugMsg( QStringLiteral( "Caught CRS exception %1" ).arg( cse.what() ) );
mTriangularMesh.vertices[i] = vertex;
}
}
else
{

0 comments on commit 9c1dc79

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