Skip to content
Permalink
Browse files

avoid reloading triangular mesh when transforms are invalid

  • Loading branch information
vcloarec authored and PeterPetrik committed Mar 10, 2020
1 parent 7edf1f2 commit 3b40c3a16332d26980e68d69fbd2683f53284433
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/mesh/qgstriangularmesh.cpp
@@ -119,9 +119,10 @@ bool QgsTriangularMesh::update( QgsMesh *nativeMesh, const QgsCoordinateTransfor
if ( mTriangularMesh.vertices.size() >= nativeMesh->vertices.size() &&
mTriangularMesh.faces.size() >= nativeMesh->faces.size() &&
mTriangularMesh.edges.size() == nativeMesh->edges.size() &&
mCoordinateTransform.sourceCrs() == transform.sourceCrs() &&
mCoordinateTransform.destinationCrs() == transform.destinationCrs() &&
mCoordinateTransform.isValid() == transform.isValid() )
( ( !mCoordinateTransform.isValid() && !transform.isValid() ) ||
( mCoordinateTransform.sourceCrs() == transform.sourceCrs() &&
mCoordinateTransform.destinationCrs() == transform.destinationCrs() &&
mCoordinateTransform.isValid() == transform.isValid() ) ) )
return false;

// CLEAN-UP

0 comments on commit 3b40c3a

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