From c94d100bebf74abc4799d233129b3922e26a3fb2 Mon Sep 17 00:00:00 2001 From: mhugent Date: Wed, 11 Apr 2007 14:31:01 +0000 Subject: [PATCH] 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 --- src/app/legend/qgslegendlayerfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/legend/qgslegendlayerfile.cpp b/src/app/legend/qgslegendlayerfile.cpp index bd07004e7a5..eaa9678d3cf 100644 --- a/src/app/legend/qgslegendlayerfile.cpp +++ b/src/app/legend/qgslegendlayerfile.cpp @@ -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;