Skip to content

Commit

Permalink
Use layout manager when testing for unique composer names
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 21, 2017
1 parent 3a1ac1a commit bfb15da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -183,6 +183,7 @@
#include "qgslayertreeutils.h"
#include "qgslayertreeview.h"
#include "qgslayertreeviewdefaultactions.h"
#include "qgslayoutmanager.h"
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgsmapcanvasdockwidget.h"
Expand Down Expand Up @@ -6925,9 +6926,9 @@ bool QgisApp::uniqueComposerTitle( QWidget *parent, QString &composerTitle, bool

QStringList cNames;
cNames << newTitle;
Q_FOREACH ( QgsComposer *c, printComposers() )
Q_FOREACH ( QgsComposition *c, QgsProject::instance()->layoutManager()->compositions() )
{
cNames << c->title();
cNames << c->name();
}

while ( !titleValid )
Expand Down

0 comments on commit bfb15da

Please sign in to comment.