mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -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() );
|
listWidget->setCurrentRow( settings.value( "/Windows/RasterLayerProperties/row" ).toInt() );
|
||||||
|
|
||||||
setWindowTitle( tr( "Layer Properties - %1" ).arg( lyr->name() ) );
|
setWindowTitle( tr( "Layer Properties - %1" ).arg( lyr->name() ) );
|
||||||
|
mpHistogramLayout = new QVBoxLayout( mChartWidget );
|
||||||
|
mpHistogramLayout->setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
mChartWidget->setLayout( mpHistogramLayout );
|
||||||
} // QgsRasterLayerProperties ctor
|
} // QgsRasterLayerProperties ctor
|
||||||
|
|
||||||
|
|
||||||
@ -1863,10 +1866,7 @@ void QgsRasterLayerProperties::refreshHistogram()
|
|||||||
mpPlot = new QwtPlot( mChartWidget );
|
mpPlot = new QwtPlot( mChartWidget );
|
||||||
//ensure all children get removed
|
//ensure all children get removed
|
||||||
mpPlot->setAutoDelete( true );
|
mpPlot->setAutoDelete( true );
|
||||||
QVBoxLayout *mpHistogramLayout = new QVBoxLayout( mChartWidget );
|
|
||||||
mpHistogramLayout->setContentsMargins( 0, 0, 0, 0 );
|
|
||||||
mpHistogramLayout->addWidget( mpPlot );
|
mpHistogramLayout->addWidget( mpPlot );
|
||||||
mChartWidget->setLayout( mpHistogramLayout );
|
|
||||||
mpPlot->setTitle( QObject::tr( "Raster Histogram") );
|
mpPlot->setTitle( QObject::tr( "Raster Histogram") );
|
||||||
mpPlot->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );
|
mpPlot->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );
|
||||||
// Set axis titles
|
// Set axis titles
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "qgscolorrampshader.h"
|
#include "qgscolorrampshader.h"
|
||||||
#include "qgscontexthelp.h"
|
#include "qgscontexthelp.h"
|
||||||
|
|
||||||
|
class QVBoxLayout;
|
||||||
class QgsMapLayer;
|
class QgsMapLayer;
|
||||||
class QgsMapCanvas;
|
class QgsMapCanvas;
|
||||||
class QgsRasterLayer;
|
class QgsRasterLayer;
|
||||||
@ -222,6 +222,7 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
|
|||||||
QgsMapCanvas* mMapCanvas;
|
QgsMapCanvas* mMapCanvas;
|
||||||
QgsPixelSelectorTool* mPixelSelectorTool;
|
QgsPixelSelectorTool* mPixelSelectorTool;
|
||||||
QwtPlot * mpPlot;
|
QwtPlot * mpPlot;
|
||||||
|
QVBoxLayout *mpHistogramLayout;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user