mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
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
This commit is contained in:
parent
e6a6db89a1
commit
83af35275e
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user