Skip to content

Commit 39eaff9

Browse files
committed
Merge pull request #1483 from 3nids/pasteshape
fix #10672: force multi when pasting on a shapefile
2 parents 7d9b8dd + be032f7 commit 39eaff9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app/qgisapp.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -5873,6 +5873,11 @@ void QgisApp::editPaste( QgsMapLayer *destinationLayer )
58735873
// convert geometry to match destination layer
58745874
QGis::GeometryType destType = pasteVectorLayer->geometryType();
58755875
bool destIsMulti = QGis::isMultiType( pasteVectorLayer->wkbType() );
5876+
if ( pasteVectorLayer->storageType() == "ESRI Shapefile" )
5877+
{
5878+
// force destination to multi if shapefile
5879+
destIsMulti = true;
5880+
}
58765881
if ( destType != QGis::UnknownGeometry )
58775882
{
58785883
QgsGeometry* newGeometry = featureIt->geometry()->convertToType( destType, destIsMulti );

0 commit comments

Comments
 (0)