Skip to content

Commit

Permalink
[gui] Fix progress bar in status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
agiudiceandrea authored and github-actions[bot] committed Jan 2, 2025
1 parent 31af1c0 commit 161a4a1
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 161a4a1

Please sign in to comment.