Bug with empty document crash fixed

git-svn-id: https://svn.code.sf.net/p/qlscribe/svn/trunk@35 cac9541e-1b8d-4bfa-827e-589bba606050
This commit is contained in:
ruglory
2009-01-31 04:26:13 +00:00
parent 31136eeb12
commit 3d0c7be90c
+1 -1
View File
@@ -107,7 +107,7 @@ void QDialogProgress::onLabelProgress( long current, long final )
m_ui->progressPrinting->setMaximum( final );
m_ui->progressPrinting->setValue( current );
if( current && double( current ) / final > 0.1 ) {
if( current && final / double( current ) < 10.0 ) {
int elapsed = m_start->elapsed();
int estimate = double( elapsed ) / current * final;
m_ui->timeEstimated->setTime( QTime().addMSecs( estimate ) );