Skip to content
Permalink
Browse files
[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 7894ec5bba178a13bceb3ed091fdfe962975a79c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/quickgui/qgsquickmapsettings.cpp
@@ -21,6 +21,7 @@
#include "qgsmaplayerstylemanager.h"
#include "qgsmessagelog.h"
#include "qgsproject.h"
#include "qgsprojectviewsettings.h"

QgsQuickMapSettings::QgsQuickMapSettings( QObject *parent )
: QObject( parent )
@@ -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 );

0 comments on commit 7894ec5

Please sign in to comment.