Skip to content
Permalink
Browse files

grass: fix relative path support for working database and vector laye…

…rs (fixes #12725)
  • Loading branch information
jef-n committed May 9, 2015
1 parent eb716fc commit e5dbd186d8f185174ac5fc8fd152e586aa9925f0
Showing with 6 additions and 4 deletions.
  1. +1 −1 src/core/qgsproject.cpp
  2. +5 −3 src/plugins/grass/qgsgrassplugin.cpp
@@ -1479,7 +1479,7 @@ QString QgsProject::writePath( QString src, QString relativeBasePath ) const

QFileInfo srcFileInfo( src );
QFileInfo projFileInfo( fileName() );
QString srcPath = srcFileInfo.canonicalFilePath();
QString srcPath = srcFileInfo.exists() ? srcFileInfo.canonicalFilePath() : src;
QString projPath = projFileInfo.canonicalFilePath();

if ( !relativeBasePath.isNull() )
@@ -303,7 +303,7 @@ void QgsGrassPlugin::saveMapset()

// Save working mapset in project file
QgsProject::instance()->writeEntry( "GRASS", "/WorkingGisdbase",
QgsGrass::getDefaultGisdbase() );
QgsProject::instance()->writePath( QgsGrass::getDefaultGisdbase() ) );

QgsProject::instance()->writeEntry( "GRASS", "/WorkingLocation",
QgsGrass::getDefaultLocation() );
@@ -796,8 +796,10 @@ void QgsGrassPlugin::projectRead()
QgsDebugMsg( "entered." );

bool ok;
QString gisdbase = QgsProject::instance()->readEntry(
"GRASS", "/WorkingGisdbase", "", &ok ).trimmed();
QString gisdbase = QgsProject::instance()->readPath(
QgsProject::instance()->readEntry(
"GRASS", "/WorkingGisdbase", "", &ok ).trimmed()
);
QString location = QgsProject::instance()->readEntry(
"GRASS", "/WorkingLocation", "", &ok ).trimmed();
QString mapset = QgsProject::instance()->readEntry(

0 comments on commit e5dbd18

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