mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Apply suggestions from code review
This commit is contained in:
parent
f24d4c4f3d
commit
1a019895c9
@ -498,9 +498,8 @@ void QgsLayoutMapWidget::aboutToShowLayersMenu()
|
||||
|
||||
QAction *action = new QAction( icon, text, mLayersMenu );
|
||||
action->setToolTip( tooltip );
|
||||
connect( action, &QAction::triggered, this, [=] {
|
||||
QgsMapLayer *layer = QgsProject::instance()->mapLayer( layerId );
|
||||
if ( layer )
|
||||
connect( action, &QAction::triggered, this, [this, layerId] {
|
||||
if ( QgsMapLayer *layer = QgsProject::instance()->mapLayer( layerId ) )
|
||||
{
|
||||
setToCustomExtent( QgsReferencedRectangle( layer->extent(), layer->crs() ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user