Skip to content
Permalink
Browse files

partial revert of 5dc91b4 to fix regression (fixes #18073)

setMaximumHeight() stays, so hopefully we are still protected
from infinit canvas redraw loop.
  • Loading branch information
nirvn committed Feb 12, 2018
1 parent 5431a2d commit f10758e1b608f9020b920b3e55ca3c3e0cca7af1
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/app/qgisapp.cpp
@@ -2782,8 +2782,9 @@ void QgisApp::createStatusBar()
// And also rendering suppression checkbox
mProgressBar = new QProgressBar( mStatusBar );
mProgressBar->setObjectName( QStringLiteral( "mProgressBar" ) );
mProgressBar->setMaximumWidth( 0 );
mProgressBar->setMaximumWidth( 100 );
mProgressBar->setMaximumHeight( 18 );
mProgressBar->hide();
mStatusBar->addPermanentWidget( mProgressBar, 1 );

connect( mMapCanvas, &QgsMapCanvas::renderStarting, this, &QgisApp::canvasRefreshStarted );
@@ -11072,14 +11073,14 @@ void QgisApp::showProgress( int progress, int totalSteps )
if ( progress == totalSteps )
{
mProgressBar->reset();
mProgressBar->setMaximumWidth( 0 );
mProgressBar->hide();
}
else
{
//only call show if not already hidden to reduce flicker
if ( mProgressBar->maximumWidth() == 0 )
if ( !mProgressBar->isVisible() )
{
mProgressBar->setMaximumWidth( 100 );
mProgressBar->show();
}
mProgressBar->setMaximum( totalSteps );
mProgressBar->setValue( progress );

0 comments on commit f10758e

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