Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[qgsquick] When reading map settings from a loaded project and
the canvas bits are missing, use proper project full extent
  • Loading branch information
nirvn committed Jun 27, 2021
1 parent 856a63a commit 7894ec5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/quickgui/qgsquickmapsettings.cpp
Expand Up @@ -21,6 +21,7 @@
#include "qgsmaplayerstylemanager.h"
#include "qgsmessagelog.h"
#include "qgsproject.h"
#include "qgsprojectviewsettings.h"

QgsQuickMapSettings::QgsQuickMapSettings( QObject *parent )
: QObject( parent )
Expand Down Expand Up @@ -241,7 +242,7 @@ void QgsQuickMapSettings::onReadProject( const QDomDocument &doc )
if ( !foundTheMapCanvas )
{
mMapSettings.setDestinationCrs( mProject->crs() );
mMapSettings.setExtent( mMapSettings.fullExtent() );
mMapSettings.setExtent( mProject->viewSettings()->fullExtent() );
}

mMapSettings.setRotation( 0 );
Expand Down

0 comments on commit 7894ec5

Please sign in to comment.