Commit dff7943b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - MainInterface, Don't show remaining time when length is 0.

parent d1cf65c5
...@@ -655,11 +655,12 @@ void MainInterface::setDisplayPosition( float pos, int time, int length ) ...@@ -655,11 +655,12 @@ void MainInterface::setDisplayPosition( float pos, int time, int length )
{ {
char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE]; char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE];
secstotimestr( psz_length, length ); secstotimestr( psz_length, length );
secstotimestr( psz_time, b_remainingTime ? length - time : time ); secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
: time );
QString title; title.sprintf( "%s/%s", psz_time, psz_length ); QString title; title.sprintf( "%s/%s", psz_time, psz_length );
/* Add a minus to remaining time*/ /* Add a minus to remaining time*/
if( b_remainingTime ) timeLabel->setText( " -"+title+" " ); if( b_remainingTime && length ) timeLabel->setText( " -"+title+" " );
else timeLabel->setText( " "+title+" " ); else timeLabel->setText( " "+title+" " );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment