mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fixed bug where histogram disappears when defocussing then focusing histogram tab
git-svn-id: http://svn.osgeo.org/qgis/trunk@14387 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
be8ab616b9
commit
2d168d95e4
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "qgscolorrampshader.h"
|
||||
#include "qgscontexthelp.h"
|
||||
|
||||
|
||||
class QVBoxLayout;
|
||||
class QgsMapLayer;
|
||||
class QgsMapCanvas;
|
||||
class QgsRasterLayer;
|
||||
@ -222,6 +222,7 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
|
||||
QgsMapCanvas* mMapCanvas;
|
||||
QgsPixelSelectorTool* mPixelSelectorTool;
|
||||
QwtPlot * mpPlot;
|
||||
QVBoxLayout *mpHistogramLayout;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user