Skip to content
Permalink
Browse files
Remove more ununused composer code, fix updating existing
compositions when settings change
  • Loading branch information
nyalldawson committed Mar 21, 2017
1 parent 8c8ac61 commit 5722f15a6e5e3f29942dce0465ec6af47d056203
Showing with 2 additions and 25 deletions.
  1. +0 −16 src/app/composer/qgscomposer.cpp
  2. +0 −4 src/app/composer/qgscomposer.h
  3. +2 −5 src/app/qgisapp.cpp
@@ -3361,22 +3361,6 @@ void QgsComposer::restoreWindowState()
}
}

void QgsComposer::templateXml( QDomDocument &doc )
{
QDomElement composerElem = doc.createElement( QStringLiteral( "Composer" ) );
composerElem.setAttribute( QStringLiteral( "title" ), mTitle );
doc.appendChild( composerElem );

//store composition
if ( mComposition )
{
mComposition->writeXml( composerElem, doc );
}

// store atlas
mComposition->atlasComposition().writeXml( composerElem, doc );
}

void QgsComposer::createCompositionWidget()
{
if ( !mComposition )
@@ -433,10 +433,6 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! Shows the configuration widget for a composer item
void showItemOptions( QgsComposerItem *i );


//! Stores only template as base Dom node
void templateXml( QDomDocument &doc );

void setSelectionTool();

//! Raise, unminimize and activate this window
@@ -9243,12 +9243,9 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString &currentPage )
//update any open compositions so they reflect new composer settings
//we have to push the changes to the compositions here, because compositions
//have no access to qgisapp and accordingly can't listen in to changes
QSet<QgsComposer *> composers = instance()->printComposers();
QSet<QgsComposer *>::iterator composer_it = composers.begin();
for ( ; composer_it != composers.end(); ++composer_it )
Q_FOREACH ( QgsComposition *c, QgsProject::instance()->layoutManager()->compositions() )
{
QgsComposition *composition = ( *composer_it )->composition();
composition->updateSettings();
c->updateSettings();
}

//do we need this? TS

0 comments on commit 5722f15

Please sign in to comment.