PROGRESS_REPORTER: KeepRefreshing shouldn't block on non-OpenMP systems
Fixes: lp:1737277 * https://bugs.launchpad.net/kicad/+bug/1737277
This commit is contained in:
parent
941ebe376c
commit
2831268b60
|
@ -99,13 +99,17 @@ void WX_PROGRESS_REPORTER::updateUI()
|
|||
wxProgressDialog::Update( cur, m_rptMessage );
|
||||
}
|
||||
|
||||
void PROGRESS_REPORTER::KeepRefreshing()
|
||||
void PROGRESS_REPORTER::KeepRefreshing( bool aWait )
|
||||
{
|
||||
while ( m_progress < m_maxProgress && m_maxProgress > 0)
|
||||
{
|
||||
updateUI();
|
||||
#ifdef USE_OPENMP
|
||||
#ifdef USE_OPENMP
|
||||
while ( m_progress < m_maxProgress && m_maxProgress > 0)
|
||||
{
|
||||
updateUI();
|
||||
wxMilliSleep(10);
|
||||
#endif
|
||||
}
|
||||
if ( !aWait )
|
||||
return;
|
||||
}
|
||||
#else
|
||||
updateUI();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class PROGRESS_REPORTER
|
|||
void SetMaxProgress ( int aMaxProgress );
|
||||
void AdvanceProgress( );
|
||||
|
||||
void KeepRefreshing();
|
||||
void KeepRefreshing( bool aWait = false );
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Reference in New Issue