Skip to content
Permalink
Browse files
allow invalid Z value with transform mesh vertex by expression
  • Loading branch information
vcloarec committed Nov 15, 2021
1 parent 546edc6 commit 543e79d68d5307375a93fca090fd886ad6bdcfe7
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 543e79d

Please sign in to comment.