Skip to content

Commit 49a6486

Browse files
author
rblazek
committedMar 15, 2010
set default GRASS_GUI
git-svn-id: http://svn.osgeo.org/qgis/trunk@13057 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2bb766e commit 49a6486

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/providers/grass/qgsgrass.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
519519

520520
QFile in( globalGisrc );
521521
QString line;
522+
bool guiSet = false;
522523
char buf[1000];
523524
if ( in.open( QIODevice::ReadOnly ) )
524525
{
@@ -531,6 +532,7 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
531532
{
532533
continue;
533534
}
535+
if ( line.contains( "GRASS_GUI:" ) ) guiSet = true;
534536
stream << line;
535537
}
536538
in.close();
@@ -541,6 +543,9 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
541543
stream << line;
542544
line = "MAPSET: " + mapset + "\n";
543545
stream << line;
546+
if ( !guiSet ) {
547+
stream << "GRASS_GUI: wxpython\n";
548+
}
544549

545550
out.close();
546551

0 commit comments

Comments
 (0)
Please sign in to comment.