Skip to content

Commit

Permalink
Store initial extent as DefaultViewExtent in view settings
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 17, 2020
1 parent 13a43de commit 0c8952e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -7298,6 +7298,9 @@ bool QgisApp::fileSave()
}
}

// Store current map view settings into the project
QgsProject::instance()->viewSettings()->setDefaultViewExtent( QgsReferencedRectangle( mapCanvas()->extent(), QgsProject::instance()->crs() ) );

if ( QgsProject::instance()->write() )
{
setTitleBarText_( *this ); // update title bar
Expand Down

0 comments on commit 0c8952e

Please sign in to comment.