WX_PROGRESS_REPORTER: fix assert warnings
This commit is contained in:
parent
f34b86d39e
commit
4facfd846a
|
@ -29,8 +29,8 @@
|
||||||
PROGRESS_REPORTER::PROGRESS_REPORTER( int aNumPhases ) :
|
PROGRESS_REPORTER::PROGRESS_REPORTER( int aNumPhases ) :
|
||||||
m_phase( 0 ),
|
m_phase( 0 ),
|
||||||
m_progress( 0 ),
|
m_progress( 0 ),
|
||||||
m_maxProgress( 1 ),
|
m_numPhases( aNumPhases ),
|
||||||
m_numPhases( aNumPhases )
|
m_maxProgress( 1 )
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,6 +97,10 @@ WX_PROGRESS_REPORTER::~WX_PROGRESS_REPORTER()
|
||||||
void WX_PROGRESS_REPORTER::updateUI()
|
void WX_PROGRESS_REPORTER::updateUI()
|
||||||
{
|
{
|
||||||
int cur = currentProgress();
|
int cur = currentProgress();
|
||||||
|
|
||||||
|
if( cur < 0 || cur > 1000 )
|
||||||
|
cur = 0;
|
||||||
|
|
||||||
SetRange( 1000 );
|
SetRange( 1000 );
|
||||||
Update( cur, m_message );
|
Update( cur, m_message );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue