Skip to content

Commit

Permalink
set default GRASS_GUI
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13057 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 15, 2010
1 parent 2bb766e commit 49a6486
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -519,6 +519,7 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q

QFile in( globalGisrc );
QString line;
bool guiSet = false;
char buf[1000];
if ( in.open( QIODevice::ReadOnly ) )
{
Expand All @@ -531,6 +532,7 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
{
continue;
}
if ( line.contains( "GRASS_GUI:" ) ) guiSet = true;
stream << line;
}
in.close();
Expand All @@ -541,6 +543,9 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
stream << line;
line = "MAPSET: " + mapset + "\n";
stream << line;
if ( !guiSet ) {
stream << "GRASS_GUI: wxpython\n";
}

out.close();

Expand Down

0 comments on commit 49a6486

Please sign in to comment.