Skip to content

Commit

Permalink
Merge pull request #60041 from qgis/backport-60036-to-release-3_40
Browse files Browse the repository at this point in the history
[Backport release-3_40] [GUI] Fix progressbar in the main window's status bar
  • Loading branch information
m-kuhn authored Jan 4, 2025
2 parents 31af1c0 + 161a4a1 commit 50211e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgstaskmanagerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void QgsTaskManagerWidget::modelRowsInserted( const QModelIndex &, int start, in
if ( progress > 0 )
{
progressBar->setMaximum( 100 );
progressBar->setValue( static_cast<int>( std::round( progress ) ) );
progressBar->setValue( static_cast<int>( progress ) );
}
else
progressBar->setMaximum( 0 );
Expand Down Expand Up @@ -641,7 +641,7 @@ void QgsTaskManagerStatusBarWidget::toggleDisplay()

void QgsTaskManagerStatusBarWidget::overallProgressChanged( double progress )
{
mProgressBar->setValue( static_cast<int>( std::round( progress ) ) );
mProgressBar->setValue( static_cast<int>( progress ) );
if ( qgsDoubleNear( progress, 0.0 ) )
mProgressBar->setMaximum( 0 );
else if ( mProgressBar->maximum() == 0 )
Expand Down

0 comments on commit 50211e5

Please sign in to comment.