Skip to content
Permalink
Browse files

The layouts currently stored with a project are QgsPrintLayouts

In future other layout types will be stored in projects, but
for now we only have print layouts
  • Loading branch information
nyalldawson committed Dec 19, 2017
1 parent e6a6db8 commit 83af35275e6aedf4bc7045418e8b8218472004db
Showing with 7 additions and 1 deletion.
  1. +2 −1 src/core/composer/qgslayoutmanager.cpp
  2. +5 −0 src/core/layout/qgsprintlayout.cpp
@@ -18,6 +18,7 @@
#include "qgsproject.h"
#include "qgslogger.h"
#include "qgslayoutundostack.h"
#include "qgsprintlayout.h"

QgsLayoutManager::QgsLayoutManager( QgsProject *project )
: QObject( project )
@@ -193,7 +194,7 @@ bool QgsLayoutManager::readXml( const QDomElement &element, const QDomDocument &
const QDomNodeList layoutNodes = element.elementsByTagName( QStringLiteral( "Layout" ) );
for ( int i = 0; i < layoutNodes.size(); ++i )
{
std::unique_ptr< QgsLayout > l = qgis::make_unique< QgsLayout >( mProject );
std::unique_ptr< QgsLayout > l = qgis::make_unique< QgsPrintLayout >( mProject );
l->undoStack()->blockCommands( true );
if ( !l->readXml( layoutNodes.at( i ).toElement(), doc, context ) )
{
@@ -22,3 +22,8 @@ QgsPrintLayout::QgsPrintLayout( QgsProject *project )
, mAtlas( new QgsLayoutAtlas( this ) )
{
}

QgsLayoutAtlas *QgsPrintLayout::atlas()
{
return mAtlas;
}

0 comments on commit 83af352

Please sign in to comment.
You can’t perform that action at this time.