Skip to content

Commit

Permalink
fix offline editing
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Sep 14, 2018
1 parent 97376b8 commit c776746
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -969,11 +969,12 @@ void QgsOfflineEditing::copySymbology( QgsVectorLayer *sourceLayer, QgsVectorLay
QString error;
QDomDocument doc;
QgsReadWriteContext context;
sourceLayer->exportNamedStyle( doc, error, context );
QgsMapLayer::StyleCategories categories = static_cast<QgsMapLayer::StyleCategories>( QgsMapLayer::AllStyleCategories ) & ~QgsMapLayer::CustomProperties;
sourceLayer->exportNamedStyle( doc, error, context, categories );

if ( error.isEmpty() )
{
targetLayer->importNamedStyle( doc, error );
targetLayer->importNamedStyle( doc, error, categories );
}
if ( !error.isEmpty() )
{
Expand Down

0 comments on commit c776746

Please sign in to comment.