Skip to content

Commit

Permalink
prevent double refresh of histogram tab (#4132)
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennesky committed Jul 14, 2012
1 parent cf58d3e commit 41328f4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -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


Expand Down Expand Up @@ -1193,7 +1186,7 @@ void QgsRasterLayerProperties::on_tabBar_currentChanged( int theTab )
{
refreshHistogram();
}
else
else if ( tabPageHistogram->isEnabled() )
{
if ( QApplication::overrideCursor() )
QApplication::restoreOverrideCursor();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 41328f4

Please sign in to comment.