Skip to content
Permalink
Browse files

Fixed bug where histogram disappears when defocussing then focusing h…

…istogram tab

git-svn-id: http://svn.osgeo.org/qgis/trunk@14387 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Oct 17, 2010
1 parent be8ab61 commit 2d168d95e469f79dadbc23eb3e515278d7e5822e
Showing with 5 additions and 4 deletions.
  1. +3 −3 src/app/qgsrasterlayerproperties.cpp
  2. +2 −1 src/app/qgsrasterlayerproperties.h
@@ -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;
};

/**

0 comments on commit 2d168d9

Please sign in to comment.
You can’t perform that action at this time.