Skip to content

Commit

Permalink
don't apply raster style to vectors (fix #15001)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3ece8ac)
  • Loading branch information
alexbruy committed Jun 27, 2016
1 parent 7eeb69c commit e29eb57
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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" ),
Expand Down

0 comments on commit e29eb57

Please sign in to comment.