Skip to content
Permalink
Browse files

Re-add actionZoomToLayer in canvasdockwidget.cpp

  • Loading branch information
TurboGraphxBeige authored and nyalldawson committed Jan 1, 2021
1 parent e25d857 commit 68cb100428ecb854bd1e13aa2db840aedd274888
Showing with 11 additions and 1 deletion.
  1. +1 −0 src/app/qgsmapcanvasdockwidget.cpp
  2. +10 −1 src/ui/qgsmapcanvasdockwidgetbase.ui
@@ -95,6 +95,7 @@ QgsMapCanvasDockWidget::QgsMapCanvasDockWidget( const QString &name, QWidget *pa
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsMapCanvasDockWidget::mapCrsChanged );
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsMapCanvasDockWidget::updateExtentRect );
connect( mActionZoomFullExtent, &QAction::triggered, mMapCanvas, &QgsMapCanvas::zoomToFullExtent );
connect( mActionZoomToLayer, &QAction::triggered, mMapCanvas, [ = ] { QgisApp::instance()->layerTreeView()->defaultActions()->zoomToLayer( mMapCanvas ); } );
connect( mActionZoomToLayers, &QAction::triggered, mMapCanvas, [ = ] { QgisApp::instance()->layerTreeView()->defaultActions()->zoomToLayers( mMapCanvas ); } );
connect( mActionZoomToSelected, &QAction::triggered, mMapCanvas, [ = ] { mMapCanvas->zoomToSelected(); } );
mapCrsChanged();
@@ -43,7 +43,7 @@
</property>
<addaction name="mActionZoomFullExtent"/>
<addaction name="mActionZoomToSelected"/>
<addaction name="mActionZoomToLayer"/>
<addaction name="mActionZoomToLayers"/>
</widget>
</item>
<item>
@@ -89,6 +89,15 @@
<string>Zoom to &amp;Layer</string>
</property>
</action>
<action name="mActionZoomToLayers">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToLayer.svg</normaloff>:/images/themes/default/mActionZoomToLayer.svg</iconset>
</property>
<property name="text">
<string>Zoom to &amp;Layers</string>
</property>
</action>
<action name="mActionZoomFullExtent">
<property name="icon">
<iconset resource="../../images/images.qrc">

0 comments on commit 68cb100

Please sign in to comment.
You can’t perform that action at this time.