Skip to content

Commit

Permalink
[GRASS] close vector map if no more users, fixes #14668
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed May 18, 2016
1 parent bfa90a9 commit bbaef37
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/providers/grass/qgsgrassvectormap.cpp
Expand Up @@ -76,6 +76,7 @@ int QgsGrassVectorMap::userCount() const
{
count += layer->userCount();
}
QgsDebugMsg( QString( "count = %1" ).arg( count ) );
return count;
}

Expand Down Expand Up @@ -443,9 +444,9 @@ void QgsGrassVectorMap::closeLayer( QgsGrassVectorMapLayer * layer )
QgsDebugMsg( QString( "%1 map users" ).arg( userCount() ) );
if ( userCount() == 0 )
{
// TODO: attention about dead lock, probably move to QgsGrassVectorMapStore
//QgsDebugMsg( "No more map users -> close" );
//close();
QgsDebugMsg( "No more map users -> close" );
// Once was probably causing dead lock; move to QgsGrassVectorMapStore?
close();
}

QgsDebugMsg( "layer closed" );
Expand Down

0 comments on commit bbaef37

Please sign in to comment.