Commit 46ff9ca3 authored by Scott Wheeler's avatar Scott Wheeler

Patch from Stephan Douglas for #55956. This updates the status bar while

using the slider to seek to a point in the file.

CCMAIL:55956-done@bugs.kde.org, stephen_douglas@yahoo.com

svn path=/trunk/kdemultimedia/juk/; revision=217185
parent de023541
......@@ -656,6 +656,16 @@ void JuK::slotTrackPositionSliderUpdate(int position)
if(m_player->playing() && !m_trackPositionDragging && !m_noSeek)
m_player->seekPosition(position);
// The dragging flag is set, so just update the status label, rather than seeking
if(m_player->playing() && m_trackPositionDragging && !m_noSeek) {
// position from 0 to 1
float positionFraction = float(position) / m_sliderAction->getTrackPositionSlider()->maxValue();
float totalTime = float(m_player->totalTime());
long seekTime = long(positionFraction * totalTime + 0.5); // "+0.5" for rounding
m_statusLabel->setItemCurrentTime(seekTime);
}
}
void JuK::playPause()
......
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