Skip to content

Commit 2eade8d

Browse files
committed
Save as raster access from right click menu
1 parent 7c9b2c1 commit 2eade8d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/app/legend/qgslegendlayer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
480480
theMenu.addAction( showNFeaturesAction );
481481
theMenu.addSeparator();
482482
}
483+
else if ( lyr->type() == QgsMapLayer::RasterLayer )
484+
{
485+
theMenu.addAction( tr( "Save As..." ), QgisApp::instance(), SLOT( saveAsRasterFile() ) );
486+
}
483487

484488
// properties goes on bottom of menu for consistency with normal ui standards
485489
// e.g. kde stuff

src/app/qgisapp.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,9 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
820820
void saveAsFile();
821821
void saveSelectionAsVectorFile();
822822

823+
//! save current raster layer
824+
void saveAsRasterFile();
825+
823826
//! show python console
824827
void showPythonDialog();
825828

@@ -955,8 +958,6 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
955958

956959

957960
void saveAsVectorFileGeneral( bool saveOnlySelection );
958-
//! save current raster layer
959-
void saveAsRasterFile();
960961

961962
/**Returns all annotation items in the canvas*/
962963
QList<QgsAnnotationItem*> annotationItems();

0 commit comments

Comments
 (0)