Skip to content
Permalink
Browse files
Use layout manager when testing for unique composer names
  • Loading branch information
nyalldawson committed Mar 21, 2017
1 parent 3a1ac1a commit bfb15da416c9b3795715d1634f36de66b7860066
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgisapp.cpp
@@ -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"
@@ -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 )

0 comments on commit bfb15da

Please sign in to comment.