Skip to content
Permalink
Browse files

don't apply raster style to vectors (fix #15001)

(cherry picked from commit 3ece8ac)
  • Loading branch information
alexbruy committed Jun 27, 2016
1 parent 7eeb69c commit e29eb57a8d8387b711345d769d68cde672e39bce
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/app/qgisapp.cpp
@@ -7180,6 +7180,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 e29eb57

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