Skip to content
Permalink
Browse files

close tools when mapset changed

git-svn-id: http://svn.osgeo.org/qgis/trunk@5197 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Apr 6, 2006
1 parent 8c0cb25 commit a9c915c61dff148b172c255c02e556fe6e55130c
@@ -1264,6 +1264,10 @@ QgsGrassModule::~QgsGrassModule()
#ifdef QGISDEBUG
std::cerr << "QgsGrassModule::~QgsGrassModule()" << std::endl;
#endif
if ( mProcess.state() == QProcess::Running )
{
mProcess.kill();
}
}

QDomNode QgsGrassModule::nodeByKey ( QDomElement elem, QString key )
@@ -96,6 +96,7 @@ QgsGrassPlugin::QgsGrassPlugin(QgisApp * theQGisApp, QgisIface * theQgisInterFac

QgsGrassPlugin::~QgsGrassPlugin()
{
if ( mTools ) mTools->closeTools();
QString err = QgsGrass::closeMapset();
}

@@ -238,6 +239,8 @@ void QgsGrassPlugin::initGui()

void QgsGrassPlugin::mapsetChanged ()
{
if ( mTools ) mTools->closeTools();

if ( !QgsGrass::activeMode() ) {
mOpenToolsAction->setEnabled(false);
mRegionAction->setEnabled(false);
@@ -454,5 +454,6 @@ void QgsGrassTools::closeTools()
for ( int i = mTabWidget->count()-1; i > 1; i-- )
{
delete mTabWidget->widget(i);
mTabWidget->removeTab(i);
}
}

0 comments on commit a9c915c

Please sign in to comment.
You can’t perform that action at this time.