Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid crash where composer is deleted after spawning modal composer m…
…anager
  • Loading branch information
dakcarto committed Feb 26, 2013
1 parent 0c777dd commit 37208df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/composer/qgscomposer.cpp
Expand Up @@ -70,6 +70,7 @@
#include <QSettings>
#include <QSizeGrip>
#include <QSvgGenerator>
#include <QTimer>
#include <QToolBar>
#include <QToolButton>
#include <QUndoView>
Expand Down Expand Up @@ -1356,7 +1357,10 @@ void QgsComposer::on_mActionDuplicateComposer_triggered()

void QgsComposer::on_mActionComposerManager_triggered()
{
mQgis->actionShowComposerManager()->trigger();
// NOTE: Avoid crash where composer that spawned modal manager from toolbar ends up
// being deleted by user, but event loop tries to return to composer on manager close
// (does not seem to be an issue for menu action)
QTimer::singleShot( 0, mQgis->actionShowComposerManager(), SLOT( trigger() ) ) ;
}

void QgsComposer::on_mActionSaveAsTemplate_triggered()
Expand Down

0 comments on commit 37208df

Please sign in to comment.