Skip to content

Commit fdada84

Browse files
committed
[offset] warn user when layer has Z/M geometries
1 parent 5b499f2 commit fdada84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/app/qgsmaptooloffsetcurve.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ void QgsMapToolOffsetCurve::canvasReleaseEvent( QgsMapMouseEvent *e )
9090
}
9191
mModifiedFeature = fet.id();
9292
createUserInputWidget();
93+
94+
bool hasZ = QgsWkbTypes::hasZ( mLayer->wkbType() );
95+
bool hasM = QgsWkbTypes::hasZ( mLayer->wkbType() );
96+
if ( hasZ || hasM )
97+
{
98+
emit messageEmitted( QString( "layer %1 has %2%3%4 geometry. %2%3%4 values be set to 0 when using offset tool." )
99+
.arg( mLayer->name() )
100+
.arg( hasZ ? "Z" : "" )
101+
.arg( hasZ && hasM ? "/" : "" )
102+
.arg( hasM ? "M" : "" )
103+
, Qgis::Warning );
104+
}
93105
}
94106
}
95107

0 commit comments

Comments
 (0)