4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/doInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ def doCopyLine( self ):
output = ''
items = self.rasterInfoList.selectedItems()
for r in items:
output.append( r.text() + "\n" )
output += r.text() + "\n"
if output:
clipboard = QApplication.clipboard()
clipboard.setText( output )

def doCopyAll( self ):
output = ''
for r in range( self.rasterInfoList.count() ):
output.append( self.rasterInfoList.item( r ).text() + "\n" )
output += self.rasterInfoList.item( r ).text() + "\n"
if output:
clipboard = QApplication.clipboard()
clipboard.setText( output )
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/processing/gui/Help2Html.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def getHtmlFile(self, alg, helpFile):
for out in self.alg.outputs:
s += '<h3>' + out.description + '</h3>\n'
s += '<p>' + self.getDescription(out.name) + '</p>\n'
s += '<br>'
s += '<p align="right">Algorithm author: ' + self.getDescription(self.ALG_CREATOR) + '</p>'
s += '<p align="right">Help author: ' + self.getDescription(self.ALG_HELP_CREATOR) + '</p>'
s += '</body></html>'
filename = tempFolder() + os.sep + 'temphelp.html'
tempHtml = codecs.open(filename, 'w', encoding='utf-8')
Expand Down
7 changes: 5 additions & 2 deletions src/plugins/heatmap/heatmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,11 @@ void Heatmap::run()
// Finally close the dataset
GDALClose(( GDALDatasetH ) heatmapDS );

// Open the file in QGIS window
mQGisIface->addRasterLayer( d.outputFilename(), QFileInfo( d.outputFilename() ).baseName() );
// Open the file in QGIS window if requested
if ( d.addToCanvas() )
{
mQGisIface->addRasterLayer( d.outputFilename(), QFileInfo( d.outputFilename() ).baseName() );
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/plugins/heatmap/heatmapgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ HeatmapGui::HeatmapGui( QWidget* parent, Qt::WindowFlags fl, QMap<QString, QVari
updateBBox();
updateSize();

mAddToCanvas->setChecked( s.value( "/Heatmap/addToCanvas", true ).toBool() );

blockAllSignals( false );

//finally set right the ok button
Expand Down Expand Up @@ -215,6 +217,7 @@ void HeatmapGui::saveSettings()
// Save persistent settings
QSettings s;
s.setValue( "/Heatmap/lastFormat", QVariant( formatCombo->currentIndex() ) );
s.setValue( "/Heatmap/addToCanvas", mAddToCanvas->isChecked() );

// Store temporary settings, which only apply to this session
mHeatmapSessionSettings->insert( QString( "lastInputLayer" ), QVariant( inputLayerCombo->itemData( inputLayerCombo->currentIndex() ) ) );
Expand Down Expand Up @@ -582,6 +585,11 @@ int HeatmapGui::weightField()
return weightFieldCombo->itemData( weightindex ).toInt();
}

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

QString HeatmapGui::outputFilename()
{
QString outputFileName;
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/heatmap/heatmapgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class HeatmapGui : public QDialog, private Ui::HeatmapGuiBase
/** Returns the attrinute field for weighted heat */
int weightField();

/** Returns state of the add to canvas checkbox*/
bool addToCanvas();

/** Returns the output filename/path */
QString outputFilename();

Expand Down
7 changes: 7 additions & 0 deletions src/plugins/heatmap/heatmapguibase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@
</layout>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QCheckBox" name="mAddToCanvas">
<property name="text">
<string>Add generated file to map</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
Expand Down