Skip to content
Permalink
Browse files

add to canvas checkbox in raster "save as..." dialog (fix #6949)

  • Loading branch information
alexbruy committed May 20, 2015
1 parent d393d26 commit 7e69bd12869ce6dc2a4bc61533902429c151cb03
@@ -5167,7 +5167,14 @@ void QgisApp::saveAsRasterFile()
}
else
{
if ( d.addToCanvas() )
{
addRasterLayers( QStringList( d.outputFileName() ) );
}
emit layerSavedAs( rasterLayer, d.outputFileName() );
messageBar()->pushMessage( tr( "Saving done" ),
tr( "Export to raster file has been completed" ),
QgsMessageBar::INFO, messageTimeout() );
}
}
}
@@ -264,6 +264,11 @@ bool QgsRasterLayerSaveAsDialog::tileMode() const
return mTileModeCheckBox->isChecked();
}

bool QgsRasterLayerSaveAsDialog::addToCanvas() const
{
return mAddToCanvas->isChecked();
}

QString QgsRasterLayerSaveAsDialog::outputFileName() const
{
return mSaveAsLineEdit->text();
@@ -59,6 +59,7 @@ class GUI_EXPORT QgsRasterLayerSaveAsDialog: public QDialog, private Ui::QgsRast
int maximumTileSizeX() const;
int maximumTileSizeY() const;
bool tileMode() const;
bool addToCanvas() const;
QString outputFileName() const;
QString outputFormat() const;
QgsCoordinateReferenceSystem outputCrs();
@@ -89,7 +89,7 @@
<item>
<widget class="QCheckBox" name="mTileModeCheckBox">
<property name="toolTip">
<string>Create GDAL Virtual Format composed of multiple
<string>Create GDAL Virtual Format composed of multiple
datasets with maximum width and height specified below.</string>
</property>
<property name="text">
@@ -163,6 +163,16 @@ datasets with maximum width and height specified below.</string>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="mAddToCanvas">
<property name="text">
<string>Add saved file to map</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="mScrollArea">
<property name="frameShape">
@@ -178,9 +188,9 @@ datasets with maximum width and height specified below.</string>
<property name="geometry">
<rect>
<x>0</x>
<y>-179</y>
<y>0</y>
<width>541</width>
<height>583</height>
<height>577</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">

0 comments on commit 7e69bd1

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