Skip to content

Commit 1c5ef71

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/gui/qgscomposerview.cpp

+6-2
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)