Skip to content
Permalink
Browse files
list of input maps fixed
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5857 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Sep 22, 2006
1 parent 2aa82c0 commit 7c28470a5430085b19addac4dea2ce02acfc0632
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/plugins/grass/qgsgrassmapcalc.cpp
@@ -894,7 +894,10 @@ void QgsGrassMapcalc::updateMaps()
// Check if it is GRASS raster
QString source = QDir::cleanDirPath ( layer->source() );

QChar sep = QDir::separator();
// Note: QDir::cleanPath is using '/' also on Windows
//QChar sep = QDir::separator();
QChar sep = '/';

if ( source.contains( "cellhd" ) == 0 ) continue;

// Most probably GRASS layer, check GISBASE and LOCATION
@@ -910,8 +913,11 @@ void QgsGrassMapcalc::updateMaps()
QString mapset = split.last();
split.pop_back(); // mapset

QDir locDir ( sep + split.join ( QString(sep) ) ) ;
QString loc = locDir.canonicalPath();
//QDir locDir ( sep + split.join ( QString(sep) ) ) ;
//QString loc = locDir.canonicalPath();

QString loc = source.remove ( QRegExp("/[^/]+/[^/]+/[^/]+$") );
loc = QDir(loc).canonicalPath();

QDir curlocDir ( QgsGrass::getDefaultGisdbase() + sep + QgsGrass::getDefaultLocation() );
QString curloc = curlocDir.canonicalPath();

0 comments on commit 7c28470

Please sign in to comment.