Commit d837e468 authored by Scott Wheeler's avatar Scott Wheeler

Fixed a bug where dragging wasn't properly accounted for and the JuK class

would try to advance the slider in the middle of a drag.  That doesn't
happen anymore.  :-)

svn path=/trunk/kdemultimedia/juk/; revision=204526
parent fb7b3628
......@@ -42,11 +42,13 @@ class TrackPositionSlider : public QSlider
{
public:
TrackPositionSlider(QWidget *parent, const char *name) : QSlider(parent, name) {}
protected:
void mousePressEvent(QMouseEvent *e) {
if(e->button() == LeftButton)
QSlider::mousePressEvent(new QMouseEvent(QEvent::MouseButtonPress, e->pos(), MidButton, e->state()));
if(e->button() == LeftButton) {
QSlider::mousePressEvent(new QMouseEvent(QEvent::MouseButtonPress, e->pos(), MidButton, e->state()));
emit sliderPressed();
}
else if(e->button() == MidButton)
QSlider::mousePressEvent(new QMouseEvent(QEvent::MouseButtonPress, e->pos(), LeftButton, e->state()));
}
......@@ -178,4 +180,5 @@ void SliderAction::updateSize()
}
}
#include "slideraction.moc"
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