mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Disconnect signals on unload to avoid crash when plugin has been unloaded.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7967 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
ee2874e981
commit
496c294f36
@ -231,7 +231,7 @@ void QgsGrassPlugin::initGui()
|
||||
setEditAction();
|
||||
connect ( qGisInterface, SIGNAL(currentLayerChanged(QgsMapLayer *)),
|
||||
this, SLOT(setEditAction()) );
|
||||
|
||||
|
||||
// Init Region symbology
|
||||
mRegionPen.setColor( QColor ( settings.readEntry ("/GRASS/region/color", "#ff0000" ) ) );
|
||||
mRegionPen.setWidth( settings.readNumEntry ("/GRASS/region/width", 0 ) );
|
||||
@ -823,6 +823,15 @@ void QgsGrassPlugin::unload()
|
||||
|
||||
if ( toolBarPointer )
|
||||
delete toolBarPointer;
|
||||
|
||||
// disconnect slots of QgsGrassPlugin so they're not fired also after unload
|
||||
disconnect( mCanvas, SIGNAL(renderComplete(QPainter *)), this, SLOT(postRender(QPainter *)));
|
||||
disconnect ( qGisInterface, SIGNAL(currentLayerChanged(QgsMapLayer *)),
|
||||
this, SLOT(setEditAction()) );
|
||||
|
||||
QWidget* qgis = qGisInterface->getMainWindow();
|
||||
disconnect( qgis, SIGNAL( projectRead() ), this, SLOT( projectRead()));
|
||||
disconnect( qgis, SIGNAL( newProject() ), this, SLOT(newProject()));
|
||||
}
|
||||
/**
|
||||
* Required extern functions needed for every plugin
|
||||
|
Loading…
x
Reference in New Issue
Block a user