Skip to content
Permalink
Browse files

Merge pull request #3233 from alexbruy/paste-style-fix

don't apply raster style to vectors (fix #15001)
  • Loading branch information
alexbruy committed Jun 27, 2016
2 parents eabdb65 + 3ece8ac commit c913a7f3af3a0b467af586040917e082ab9ea821
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/app/qgisapp.cpp
@@ -7671,6 +7671,13 @@ void QgisApp::pasteStyle( QgsMapLayer * destinationLayer )
return;
}

bool isVectorStyle = doc.elementsByTagName( "pipe" ).isEmpty();
if (( selectionLayer->type() == QgsMapLayer::RasterLayer && isVectorStyle ) ||
( selectionLayer->type() == QgsMapLayer::VectorLayer && !isVectorStyle ) )
{
return;
}

if ( !selectionLayer->importNamedStyle( doc, errorMsg ) )
{
messageBar()->pushMessage( tr( "Cannot paste style" ),

0 comments on commit c913a7f

Please sign in to comment.
You can’t perform that action at this time.