Skip to content

Commit

Permalink
Remove more ununused composer code, fix updating existing
Browse files Browse the repository at this point in the history
compositions when settings change
  • Loading branch information
nyalldawson committed Mar 21, 2017
1 parent 8c8ac61 commit 5722f15
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
16 changes: 0 additions & 16 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -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 )
Expand Down
4 changes: 0 additions & 4 deletions src/app/composer/qgscomposer.h
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 5722f15

Please sign in to comment.