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
  • Loading branch information
alexbruy committed Jun 24, 2016
1 parent 66c47d7 commit 3ece8ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7670,6 +7670,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 3ece8ac

Please sign in to comment.