mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
See if this fixes Chris' time-updating problem
This commit is contained in:
@@ -356,6 +356,10 @@ AudioControls::onPlaybackStopped()
|
|||||||
void
|
void
|
||||||
AudioControls::onPlaybackTimer( qint64 msElapsed )
|
AudioControls::onPlaybackTimer( qint64 msElapsed )
|
||||||
{
|
{
|
||||||
|
const int seconds = msElapsed / 1000;
|
||||||
|
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
|
||||||
|
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
|
||||||
|
|
||||||
//tDebug( LOGEXTRA ) << Q_FUNC_INFO << "msElapsed =" << msElapsed << "and timer current time =" << m_sliderTimeLine.currentTime() << "and m_seekMsecs =" << m_seekMsecs;
|
//tDebug( LOGEXTRA ) << Q_FUNC_INFO << "msElapsed =" << msElapsed << "and timer current time =" << m_sliderTimeLine.currentTime() << "and m_seekMsecs =" << m_seekMsecs;
|
||||||
if ( msElapsed > 0 && msElapsed != m_lastSliderCheck && m_seekMsecs == -1 && msElapsed - 500 < m_lastSliderCheck )
|
if ( msElapsed > 0 && msElapsed != m_lastSliderCheck && m_seekMsecs == -1 && msElapsed - 500 < m_lastSliderCheck )
|
||||||
return;
|
return;
|
||||||
@@ -372,10 +376,6 @@ AudioControls::onPlaybackTimer( qint64 msElapsed )
|
|||||||
if ( sender() != &m_phononTickCheckTimer )
|
if ( sender() != &m_phononTickCheckTimer )
|
||||||
m_phononTickCheckTimer.start( 1000 );
|
m_phononTickCheckTimer.start( 1000 );
|
||||||
|
|
||||||
const int seconds = msElapsed / 1000;
|
|
||||||
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
|
|
||||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
|
|
||||||
|
|
||||||
if ( m_noTimeChange )
|
if ( m_noTimeChange )
|
||||||
{
|
{
|
||||||
if ( m_sliderTimeLine.currentTime() != msElapsed )
|
if ( m_sliderTimeLine.currentTime() != msElapsed )
|
||||||
|
Reference in New Issue
Block a user