[QGIS Commit] r14387 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Oct 17 03:22:02 EDT 2010


Author: timlinux
Date: 2010-10-17 00:22:02 -0700 (Sun, 17 Oct 2010)
New Revision: 14387

Modified:
   trunk/qgis/src/app/qgsrasterlayerproperties.cpp
   trunk/qgis/src/app/qgsrasterlayerproperties.h
Log:
Fixed bug where histogram disappears when defocussing then focusing histogram tab

Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2010-10-16 22:08:47 UTC (rev 14386)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2010-10-17 07:22:02 UTC (rev 14387)
@@ -276,6 +276,9 @@
   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 @@
   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

Modified: trunk/qgis/src/app/qgsrasterlayerproperties.h
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.h	2010-10-16 22:08:47 UTC (rev 14386)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.h	2010-10-17 07:22:02 UTC (rev 14387)
@@ -26,7 +26,7 @@
 #include "qgscolorrampshader.h"
 #include "qgscontexthelp.h"
 
-
+class QVBoxLayout;
 class QgsMapLayer;
 class QgsMapCanvas;
 class QgsRasterLayer;
@@ -222,6 +222,7 @@
     QgsMapCanvas* mMapCanvas;
     QgsPixelSelectorTool* mPixelSelectorTool;
     QwtPlot * mpPlot;
+    QVBoxLayout *mpHistogramLayout;
 };
 
 /**



More information about the QGIS-commit mailing list