Skip to content
Permalink
Browse files
allow invalid Z value with transform mesh vertex by expression
  • Loading branch information
vcloarec authored and github-actions committed Nov 15, 2021
1 parent 5540740 commit a017711d5773f8238699d8bd8ba4f180ae58e85e
Showing with 8 additions and 11 deletions.
  1. +8 −11 src/core/mesh/qgsmeshadvancedediting.cpp
@@ -727,19 +727,16 @@ bool QgsMeshTransformVerticesByExpression::calculate( QgsMeshLayer *layer )

if ( calcZ )
{
double z = std::numeric_limits<double>::quiet_NaN();
if ( zvar.isValid() )
{
double z = zvar.toDouble( &ok );
if ( ok )
{
mNewZValues.append( z );
mOldZValues.append( vert.z() );
}
else
return false;
z = zvar.toDouble( &ok );
if ( !ok )
z = std::numeric_limits<double>::quiet_NaN();
}
else
return false;

mNewZValues.append( z );
mOldZValues.append( vert.z() );
}
}

@@ -749,7 +746,7 @@ bool QgsMeshTransformVerticesByExpression::calculate( QgsMeshLayer *layer )
};

mNativeFacesIndexesGeometryChanged = qgis::setToList( concernedFaces );
return layer->meshEditor()->canBeTransformed( mNativeFacesIndexesGeometryChanged, transformFunction );
return ( !calcX && !calcY ) || layer->meshEditor()->canBeTransformed( mNativeFacesIndexesGeometryChanged, transformFunction );
}

QString QgsMeshTransformVerticesByExpression::text() const

0 comments on commit a017711

Please sign in to comment.