Skip to content

Commit

Permalink
partial revert of 5dc91b4 to fix regression (fixes #18073)
Browse files Browse the repository at this point in the history
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 f10758e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit f10758e

Please sign in to comment.