Skip to content

Commit

Permalink
Make save as image work for new histogram implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Nov 21, 2011
1 parent 8d465ec commit 6191319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1915,12 +1915,12 @@ void QgsRasterLayerProperties::refreshHistogram()
void QgsRasterLayerProperties::on_mSaveAsImageButton_clicked()
{

QPixmap myPixmap( 600, 600 );
QPixmap myPixmap( mWebPlot->width(), mWebPlot->height() );
myPixmap.fill( Qt::white ); // Qt::transparent ?

QPainter painter;
painter.begin( &myPixmap );
//mWebPlot->drawCanvas( &painter );
mWebPlot->render( &painter );
painter.end();
QPair< QString, QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
if ( myFileNameAndFilter.first != "" )
Expand Down

0 comments on commit 6191319

Please sign in to comment.