File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -989,8 +989,7 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList & flist )
989
989
// Z and M on the end of a WKT string isn't valid for
990
990
// SQL Server so we have to remove it first.
991
991
wkt = geom.exportToWkt ();
992
- wkt = wkt.replace ( " Z" , " " );
993
- wkt = wkt.replace ( " M" , " " );
992
+ wkt.replace (QRegExp (" [mzMZ]+\\ s*\\ (" ), " (" );
994
993
}
995
994
query.addBindValue ( wkt );
996
995
}
@@ -1317,9 +1316,7 @@ bool QgsMssqlProvider::changeGeometryValues( const QgsGeometryMap &geometry_map
1317
1316
QString wkt = it->exportToWkt ();
1318
1317
// Z and M on the end of a WKT string isn't valid for
1319
1318
// SQL Server so we have to remove it first.
1320
- wkt = wkt.replace ( " Z" , " " );
1321
- wkt = wkt.replace ( " M" , " " );
1322
- QgsDebugMsg ( wkt );
1319
+ wkt.replace (QRegExp (" [mzMZ]+\\ s*\\ (" ), " (" );
1323
1320
query.addBindValue ( wkt );
1324
1321
}
1325
1322
You can’t perform that action at this time.
0 commit comments