File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5656,21 +5656,23 @@ void QgisApp::deletePrintComposers()
5656
5656
QSet<QgsComposer*>::iterator it = mPrintComposers .begin ();
5657
5657
while ( it != mPrintComposers .end () )
5658
5658
{
5659
- emit composerWillBeRemoved (( *it )->view () );
5659
+ QgsComposer* c = ( *it );
5660
+ emit composerWillBeRemoved ( c->view () );
5661
+ it = mPrintComposers .erase ( it );
5662
+ emit composerRemoved ( c->view () );
5660
5663
5661
5664
// save a reference to the composition
5662
- QgsComposition* composition = ( *it ) ->composition ();
5665
+ QgsComposition* composition = c ->composition ();
5663
5666
5664
5667
// first, delete the composer. This must occur before deleting the composition as some of the cleanup code in
5665
5668
// composer or in composer item widgets may require the composition to still be around
5666
- delete ( *it );
5669
+ delete ( c );
5667
5670
5668
5671
// next, delete the composition
5669
5672
if ( composition )
5670
5673
{
5671
5674
delete composition;
5672
5675
}
5673
- it = mPrintComposers .erase ( it );
5674
5676
}
5675
5677
mLastComposerId = 0 ;
5676
5678
markDirty ();
You can’t perform that action at this time.
0 commit comments