Unbreak scrolling again.

This commit is contained in:
Tobias Rundstrom 2006-03-01 21:52:12 -03:00
parent f4c904b022
commit 7436ae5e45
2 changed files with 3 additions and 4 deletions

View file

@ -15,8 +15,6 @@ PlaylistScrollButton::PlaylistScrollButton (PlaylistScroller *parent, uint norma
void
PlaylistScrollButton::mouseMoveEvent (QMouseEvent *event)
{
PlaylistWindow *pw = dynamic_cast<PlaylistWindow *>(window ());
QPoint p (event->pos ());
int npos = pos().y()+p.y()-m_diffy;
@ -112,6 +110,7 @@ void
PlaylistWindow::doScroll (int pos)
{
int npos = ((float)pos) / (float)(m_scroller->getMax()) * float(m_list->height() - m_view->height());
m_list->setOffset (npos);
if (npos == 0) {
m_list->update ();