Skip to content

Commit e5a1b3d

Browse files
author
mhugent
committedAug 16, 2009
Fix for crash when removing a drawing composer map
git-svn-id: http://svn.osgeo.org/qgis/trunk@11395 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent fe1367b commit e5a1b3d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/gui/qgscomposerview.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,12 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )
310310
{
311311
for ( ; itemIt != composerItemList.end(); ++itemIt )
312312
{
313-
composition()->removeItem( *itemIt );
314-
emit itemRemoved( *itemIt );
313+
QgsComposerMap* map = dynamic_cast<QgsComposerMap*>( *itemIt );
314+
if ( !map || !map->isDrawing() ) //don't delete a composer map while it draws
315+
{
316+
composition()->removeItem( *itemIt );
317+
emit itemRemoved( *itemIt );
318+
}
315319
}
316320
}
317321

0 commit comments

Comments
 (0)
Please sign in to comment.