31 QgsLayerSettings settings;
32 settings.name = layer->name();
34 settings.mNamedStyle = layer->styleManager()->currentStyle();
36 switch ( layer->type() )
44 settings.mOpacity = vLayer->
opacity();
68 mLayerSettings[layer] = settings;
76 QgsLayerSettings settings = mLayerSettings[layer];
77 layer->styleManager()->setCurrentStyle( settings.mNamedStyle );
78 layer->setName( mLayerSettings[layer].name );
81 const QString sldStyleName { layer->customProperty(
"sldStyleName",
"" ).toString() };
82 if ( !sldStyleName.isEmpty() )
84 layer->styleManager()->removeStyle( sldStyleName );
85 layer->removeCustomProperty(
"sldStyleName" );
88 switch ( layer->type() )
97 vLayer->
selectByIds( settings.mSelectedFeatureIds );
125 : mLayerRestorer( context.layers() )