Skip to content

Commit

Permalink
Merge pull request #60036 from agiudiceandrea/fix-progressbar
Browse files Browse the repository at this point in the history
[GUI] Fix progressbar in the main window's status bar
  • Loading branch information
m-kuhn authored Jan 2, 2025
2 parents 3c6a465 + 88d7ee0 commit 6f4df5d
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 6f4df5d

Please sign in to comment.