Skip to content

Commit

Permalink
fix vector save as
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 26, 2012
1 parent 812a51e commit fa277af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/legend/qgslegendlayer.cpp
Expand Up @@ -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() ) );
Expand Down
18 changes: 10 additions & 8 deletions src/app/qgisapp.cpp
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsrasterdataprovider.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit fa277af

Please sign in to comment.