Skip to content
Permalink
Browse files

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

…rs (fixes #12725)

(cherry picked from commit e5dbd18)
  • Loading branch information
jef-n committed May 9, 2015
1 parent f68cfc7 commit 3dd8008a46c921bd5a1d9c367900fc3fa290d5a4
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() )
@@ -310,7 +310,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() );
@@ -802,8 +802,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 3dd8008

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