Save as shapefile: use save dialog and remember the last directory

git-svn-id: http://svn.osgeo.org/qgis/trunk@6881 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2007-04-11 14:31:01 +00:00
parent 54a2f3487b
commit c94d100beb

View File

@ -310,6 +310,7 @@ void QgsLegendLayerFile::saveAsShapefile()
dirName,
filter,
QString("UTF-8"));
openFileDialog->setAcceptMode(QFileDialog::AcceptSave);
// allow for selection of more than one file
//openFileDialog->setMode(QFileDialog::AnyFile);
@ -317,8 +318,11 @@ void QgsLegendLayerFile::saveAsShapefile()
if (openFileDialog->exec() != QDialog::Accepted)
return;
QString encoding = openFileDialog->encoding();
QString shapefileName = openFileDialog->selectedFile();
settings.writeEntry("/UI/lastShapefileDir", QFileInfo(shapefileName).absolutePath());
if (shapefileName.isNull())
return;