Skip to content

Commit dd89226

Browse files
committedFeb 23, 2016
Fix dropping geometryless tables to postgres browser items
(cherry-picked from 4a3d3db)
1 parent 8d60664 commit dd89226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/providers/postgres/qgspostgresdataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ bool QgsPGConnectionItem::handleDrop( const QMimeData * data, Qt::DropAction )
172172

173173
if ( srcLayer->isValid() )
174174
{
175-
uri.setDataSource( QString(), u.name, "geom" );
175+
uri.setDataSource( QString(), u.name, srcLayer->geometryType() != QGis::NoGeometry ? "geom" : QString() );
176176
QgsDebugMsg( "URI " + uri.uri() );
177177
QgsVectorLayerImport::ImportError err;
178178
QString importError;

0 commit comments

Comments
 (0)
Please sign in to comment.