Skip to content
Permalink
Browse files

fix vector save as

  • Loading branch information
jef-n committed Jul 26, 2012
1 parent 812a51e commit fa277af2293c1f9550209a6f29a41a86506a869c
Showing with 13 additions and 10 deletions.
  1. +1 −1 src/app/legend/qgslegendlayer.cpp
  2. +10 −8 src/app/qgisapp.cpp
  3. +2 −1 src/core/qgsrasterdataprovider.cpp
@@ -460,7 +460,7 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
}

// save as vector file
theMenu.addAction( tr( "Save As..." ), QgisApp::instance(), SLOT( saveAsVectorFile() ) );
theMenu.addAction( tr( "Save As..." ), QgisApp::instance(), SLOT( saveAsFile() ) );

// save selection as vector file
QAction* saveSelectionAsAction = theMenu.addAction( tr( "Save Selection As..." ), QgisApp::instance(), SLOT( saveSelectionAsVectorFile() ) );
@@ -3909,16 +3909,18 @@ void QgisApp::saveAsRasterFile()
void QgisApp::saveAsFile()
{
QgsMapLayer* layer = activeLayer();
if ( layer )
{
QgsMapLayer::LayerType layerType = layer->type();
if ( layerType == QgsMapLayer::RasterLayer )
{
saveAsRasterFile();
}
if ( !layer )
return;

QgsMapLayer::LayerType layerType = layer->type();
if ( layerType == QgsMapLayer::RasterLayer )
{
saveAsRasterFile();
}
else if ( layerType == QgsMapLayer::VectorLayer )
{
saveAsVectorFileGeneral( false );
}
saveAsVectorFileGeneral( false );
}

void QgisApp::saveSelectionAsVectorFile()
@@ -22,7 +22,8 @@
#include <QTime>
#include <QMap>
#include <QByteArray>
#include <qmath>

#include <qmath.h>

void QgsRasterDataProvider::readBlock( int bandNo, QgsRectangle
const & viewExtent, int width,

0 comments on commit fa277af

Please sign in to comment.
You can’t perform that action at this time.