Skip to content
Permalink
Browse files

Don't read composer title from template. Fixes bug #2311

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12612 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Dec 24, 2009
1 parent 130e774 commit 58dc0790cd9a989baf9dcfe9ac094814e0cd2c17
Showing with 9 additions and 10 deletions.
  1. +8 −9 src/app/composer/qgscomposer.cpp
  2. +1 −1 src/app/composer/qgscomposer.h
@@ -1098,19 +1098,18 @@ void QgsComposer::readXML( const QDomDocument& doc )
{
return;
}
readXML( composerNodeList.at( 0 ).toElement(), doc );
readXML( composerNodeList.at( 0 ).toElement(), doc, true );
}

void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument& doc )
void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument& doc, bool fromTemplate )
{
// Create action to select this window
delete mWindowAction;
mWindowAction = new QAction( windowTitle(), this );
connect( mWindowAction, SIGNAL( triggered() ), this, SLOT( activate() ) );

if ( composerElem.hasAttribute( "title" ) )
// Set title only if reading from project file
if ( !fromTemplate )
{
setTitle( composerElem.attribute( "title", tr( "Composer" ) ) );
if ( composerElem.hasAttribute( "title" ) )
{
setTitle( composerElem.attribute( "title", tr( "Composer" ) ) );
}
}

//delete composer view and composition
@@ -231,7 +231,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase

//! Sets state from Dom document
void readXML( const QDomDocument& doc );
void readXML( const QDomElement& composerElem, const QDomDocument& doc );
void readXML( const QDomElement& composerElem, const QDomDocument& doc, bool fromTemplate = false );

void setSelectionTool();

0 comments on commit 58dc079

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