Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed #1364.
Changed the behavior of the file selection dialog.


git-svn-id: http://svn.osgeo.org/qgis/trunk@10960 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rugginoso committed Jun 19, 2009
1 parent 7b96fae commit a90f621
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -19,6 +19,7 @@
#include "qgsgrassselect.h"
#include "qgsgrasstools.h"
#include "qgsgrassprovider.h"
#include "qgsgrassutils.h"
#include "qgsgrass.h"

#include "qgisinterface.h"
Expand Down Expand Up @@ -1498,8 +1499,14 @@ void QgsGrassModule::viewOutput()
if ( onlyLayer1 && layers[j].left( 1 ) != "1" )
continue;

QStringList split = uri.split( '/', QString::SkipEmptyParts );
QString layer = split.last();

QString name = QgsGrassUtils::vectorLayerName(
map, layer, 1 );

// TODO vector layer name
mIface->addVectorLayer( uri, layers[j], "grass" );
mIface->addVectorLayer( uri, name, "grass" );
}
}

Expand Down Expand Up @@ -3100,7 +3107,7 @@ void QgsGrassModuleFile::browse()

if ( fd->exec() == QDialog::Accepted )
{
QString selectedFile = fd->selectedFiles().first();
QString selectedFile = fd->selectedFiles().last();
QFileInfo fi = QFileInfo(selectedFile);
currentDir = fi.absoluteDir();
if (mType == Multiple)
Expand Down

0 comments on commit a90f621

Please sign in to comment.