diff --git a/common/widgets/progress_reporter.cpp b/common/widgets/progress_reporter.cpp index 05c85904cd..c3a2d1e3a8 100644 --- a/common/widgets/progress_reporter.cpp +++ b/common/widgets/progress_reporter.cpp @@ -61,6 +61,12 @@ void PROGRESS_REPORTER::SetMaxProgress( int aMaxProgress ) m_maxProgress.store( aMaxProgress ); } +void PROGRESS_REPORTER::SetCurrentProgress( double aProgress ) +{ + m_maxProgress.store( 10000 ); + m_progress.store( (int) (aProgress * 10000.0) ); +} + void PROGRESS_REPORTER::AdvanceProgress() { diff --git a/include/widgets/progress_reporter.h b/include/widgets/progress_reporter.h index 59e333a7a8..5bc099d9e1 100644 --- a/include/widgets/progress_reporter.h +++ b/include/widgets/progress_reporter.h @@ -63,6 +63,11 @@ class PROGRESS_REPORTER */ void Report( const wxString& aMessage ); + /** + * Set the progress value to aProgress (0..1) + */ + void SetCurrentProgress( double aProgress ); + /** * Fix the value thar gives the 100 precent progress bar length * (inside the current virtual zone)