@@ -12568,7 +12568,7 @@ void QgisApp::readProject( const QDomDocument &doc )
12568
12568
}
12569
12569
}
12570
12570
12571
- void QgisApp::showLayerProperties ( QgsMapLayer *ml )
12571
+ void QgisApp::showLayerProperties ( QgsMapLayer *mapLayer )
12572
12572
{
12573
12573
/*
12574
12574
TODO: Consider reusing the property dialogs again.
@@ -12579,15 +12579,15 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml )
12579
12579
a separate copy of the dialog pointer needs to be stored with each layer.
12580
12580
*/
12581
12581
12582
- if ( !ml )
12582
+ if ( !mapLayer )
12583
12583
return ;
12584
12584
12585
- if ( !QgsProject::instance ()->layerIsEmbedded ( ml ->id () ).isEmpty () )
12585
+ if ( !QgsProject::instance ()->layerIsEmbedded ( mapLayer ->id () ).isEmpty () )
12586
12586
{
12587
12587
return ; // don't show properties of embedded layers
12588
12588
}
12589
12589
12590
- if ( ml ->type () == QgsMapLayer::RasterLayer )
12590
+ if ( mapLayer ->type () == QgsMapLayer::RasterLayer )
12591
12591
{
12592
12592
#if 0 // See note above about reusing this
12593
12593
QgsRasterLayerProperties *rlp = nullptr;
@@ -12601,27 +12601,27 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml )
12601
12601
// handled by rendererChanged() connect( rlp, SIGNAL( refreshLegend( QString, bool ) ), mLayerTreeView, SLOT( refreshLayerSymbology( QString ) ) );
12602
12602
}
12603
12603
#else
12604
- QgsRasterLayerProperties *rlp = new QgsRasterLayerProperties ( ml , mMapCanvas , this );
12604
+ QgsRasterLayerProperties *rasterLayerPropertiesDialog = new QgsRasterLayerProperties ( mapLayer , mMapCanvas , this );
12605
12605
#endif
12606
12606
// Cannot use exec here due to raster transparency map tool:
12607
12607
// in order to pass focus to the canvas, the dialog needs to
12608
12608
// be hidden and shown in non-modal mode.
12609
- rlp ->setModal ( true );
12610
- rlp ->show ();
12609
+ rasterLayerPropertiesDialog ->setModal ( true );
12610
+ rasterLayerPropertiesDialog ->show ();
12611
12611
// Delete (later, for safety) since dialog cannot be reused without
12612
12612
// updating code
12613
- connect ( rlp , &QgsRasterLayerProperties::accepted, [ rlp ]
12613
+ connect ( rasterLayerPropertiesDialog , &QgsRasterLayerProperties::accepted, [ rasterLayerPropertiesDialog ]
12614
12614
{
12615
- rlp ->deleteLater ();
12615
+ rasterLayerPropertiesDialog ->deleteLater ();
12616
12616
} );
12617
- connect ( rlp , &QgsRasterLayerProperties::rejected, [ rlp ]
12617
+ connect ( rasterLayerPropertiesDialog , &QgsRasterLayerProperties::rejected, [ rasterLayerPropertiesDialog ]
12618
12618
{
12619
- rlp ->deleteLater ();
12619
+ rasterLayerPropertiesDialog ->deleteLater ();
12620
12620
} );
12621
12621
}
12622
- else if ( ml ->type () == QgsMapLayer::VectorLayer ) // VECTOR
12622
+ else if ( mapLayer ->type () == QgsMapLayer::VectorLayer ) // VECTOR
12623
12623
{
12624
- QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( ml );
12624
+ QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mapLayer );
12625
12625
12626
12626
#if 0 // See note above about reusing this
12627
12627
QgsVectorLayerProperties *vlp = nullptr;
@@ -12635,26 +12635,26 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml )
12635
12635
// handled by rendererChanged() connect( vlp, SIGNAL( refreshLegend( QString ) ), mLayerTreeView, SLOT( refreshLayerSymbology( QString ) ) );
12636
12636
}
12637
12637
#else
12638
- QgsVectorLayerProperties *vlp = new QgsVectorLayerProperties ( vlayer, this );
12638
+ QgsVectorLayerProperties *vectorLayerPropertiesDialog = new QgsVectorLayerProperties ( vlayer, this );
12639
12639
#endif
12640
12640
Q_FOREACH ( QgsMapLayerConfigWidgetFactory *factory, mMapLayerPanelFactories )
12641
12641
{
12642
- vlp ->addPropertiesPageFactory ( factory );
12642
+ vectorLayerPropertiesDialog ->addPropertiesPageFactory ( factory );
12643
12643
}
12644
12644
12645
12645
mMapStyleWidget ->blockUpdates ( true );
12646
- if ( vlp ->exec () )
12646
+ if ( vectorLayerPropertiesDialog ->exec () )
12647
12647
{
12648
- activateDeactivateLayerRelatedActions ( ml );
12648
+ activateDeactivateLayerRelatedActions ( mapLayer );
12649
12649
mMapStyleWidget ->updateCurrentWidgetLayer ();
12650
12650
}
12651
12651
mMapStyleWidget ->blockUpdates ( false );
12652
12652
12653
- delete vlp ; // delete since dialog cannot be reused without updating code
12653
+ delete vectorLayerPropertiesDialog ; // delete since dialog cannot be reused without updating code
12654
12654
}
12655
- else if ( ml ->type () == QgsMapLayer::PluginLayer )
12655
+ else if ( mapLayer ->type () == QgsMapLayer::PluginLayer )
12656
12656
{
12657
- QgsPluginLayer *pl = qobject_cast<QgsPluginLayer *>( ml );
12657
+ QgsPluginLayer *pl = qobject_cast<QgsPluginLayer *>( mapLayer );
12658
12658
if ( !pl )
12659
12659
return ;
12660
12660
0 commit comments