Skip to content

Commit

Permalink
Fixed bug where histogram disappears when defocussing then focusing h…
Browse files Browse the repository at this point in the history
…istogram tab

git-svn-id: http://svn.osgeo.org/qgis/trunk@14387 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 17, 2010
1 parent be8ab61 commit 2d168d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -276,6 +276,9 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
listWidget->setCurrentRow( settings.value( "/Windows/RasterLayerProperties/row" ).toInt() );

setWindowTitle( tr( "Layer Properties - %1" ).arg( lyr->name() ) );
mpHistogramLayout = new QVBoxLayout( mChartWidget );
mpHistogramLayout->setContentsMargins( 0, 0, 0, 0 );
mChartWidget->setLayout( mpHistogramLayout );
} // QgsRasterLayerProperties ctor


Expand Down Expand Up @@ -1863,10 +1866,7 @@ void QgsRasterLayerProperties::refreshHistogram()
mpPlot = new QwtPlot( mChartWidget );
//ensure all children get removed
mpPlot->setAutoDelete( true );
QVBoxLayout *mpHistogramLayout = new QVBoxLayout( mChartWidget );
mpHistogramLayout->setContentsMargins( 0, 0, 0, 0 );
mpHistogramLayout->addWidget( mpPlot );
mChartWidget->setLayout( mpHistogramLayout );
mpPlot->setTitle( QObject::tr( "Raster Histogram") );
mpPlot->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );
// Set axis titles
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsrasterlayerproperties.h
Expand Up @@ -26,7 +26,7 @@
#include "qgscolorrampshader.h"
#include "qgscontexthelp.h"


class QVBoxLayout;
class QgsMapLayer;
class QgsMapCanvas;
class QgsRasterLayer;
Expand Down Expand Up @@ -222,6 +222,7 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
QgsMapCanvas* mMapCanvas;
QgsPixelSelectorTool* mPixelSelectorTool;
QwtPlot * mpPlot;
QVBoxLayout *mpHistogramLayout;
};

/**
Expand Down

0 comments on commit 2d168d9

Please sign in to comment.