Skip to content

Commit

Permalink
Better reference item to zoom to in modeler
Browse files Browse the repository at this point in the history
cherry-pick 01e391e
  • Loading branch information
DelazJ authored and nyalldawson committed Nov 27, 2021
1 parent 9211532 commit 96da9f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/processing/models/qgsmodeldesignerdialog.cpp
Expand Up @@ -832,7 +832,7 @@ void QgsModelDesignerDialog::populateZoomToMenu()
QAction *zoomAction = new QAction( box.description(), mGroupMenu );
connect( zoomAction, &QAction::triggered, this, [ = ]
{
QRectF groupRect = item->boundingRect();
QRectF groupRect = item->mapToScene( item->boundingRect() ).boundingRect();
groupRect.adjust( -10, -10, 10, 10 );
mView->fitInView( groupRect, Qt::KeepAspectRatio );
mView->centerOn( item );
Expand Down

0 comments on commit 96da9f8

Please sign in to comment.