Skip to content

Commit

Permalink
Fix for crash when removing a drawing composer map
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11395 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 16, 2009
1 parent c26ca98 commit 1c5ef71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/qgscomposerview.cpp
Expand Up @@ -310,8 +310,12 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )
{
for ( ; itemIt != composerItemList.end(); ++itemIt )
{
composition()->removeItem( *itemIt );
emit itemRemoved( *itemIt );
QgsComposerMap* map = dynamic_cast<QgsComposerMap*>( *itemIt );
if ( !map || !map->isDrawing() ) //don't delete a composer map while it draws
{
composition()->removeItem( *itemIt );
emit itemRemoved( *itemIt );
}
}
}

Expand Down

0 comments on commit 1c5ef71

Please sign in to comment.