Skip to content
Permalink
Browse files

prevent double refresh of histogram tab (#4132)

  • Loading branch information
etiennesky committed Jul 14, 2012
1 parent cf58d3e commit 41328f4af7c3ed3937975904d7399a80eb0569bf
Showing with 2 additions and 9 deletions.
  1. +2 −9 src/app/qgsrasterlayerproperties.cpp
@@ -381,13 +381,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
// set current tab after everything has been initialized
tabBar->setCurrentIndex( settings.value( "/Windows/RasterLayerProperties/row" ).toInt() );

// show histogram tab
int myHistogramTab = 5;
if ( tabBar->currentIndex() == myHistogramTab )
{
refreshHistogram();
}

} // QgsRasterLayerProperties ctor


@@ -1193,7 +1186,7 @@ void QgsRasterLayerProperties::on_tabBar_currentChanged( int theTab )
{
refreshHistogram();
}
else
else if ( tabPageHistogram->isEnabled() )
{
if ( QApplication::overrideCursor() )
QApplication::restoreOverrideCursor();
@@ -1432,7 +1425,7 @@ void QgsRasterLayerProperties::refreshHistogram()
// subtract -0.5 to prevent rounding errors
// see http://www.gdal.org/classGDALRasterBand.html#3f8889607d3b2294f7e0f11181c201c8
mpPlot->setAxisScale( QwtPlot::xBottom,
mHistoMin - 0.5,
mHistoMin - 0.5,
mHistoMax + 0.5 );

mpPlot->replot();

0 comments on commit 41328f4

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