Skip to content

Commit bbaef37

Browse files
committed
[GRASS] close vector map if no more users, fixes #14668
1 parent bfa90a9 commit bbaef37

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/providers/grass/qgsgrassvectormap.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ int QgsGrassVectorMap::userCount() const
7676
{
7777
count += layer->userCount();
7878
}
79+
QgsDebugMsg( QString( "count = %1" ).arg( count ) );
7980
return count;
8081
}
8182

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

451452
QgsDebugMsg( "layer closed" );

0 commit comments

Comments
 (0)