Skip to content

Commit

Permalink
Store initial extent as DefaultViewExtent in view settings
Browse files Browse the repository at this point in the history
(cherry picked from commit 0c8952e)
  • Loading branch information
elpaso authored and nyalldawson committed Nov 20, 2020
1 parent e51a263 commit 03bef69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -7211,6 +7211,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 03bef69

Please sign in to comment.