paysages : Fixed incomplete preview updating, and preview freezing.

git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@297 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
Michaël Lemaire 2012-04-16 15:26:56 +00:00 committed by ThunderK
parent 5e6952b4c8
commit 20bce5da8a

View file

@ -135,6 +135,7 @@ void BasePreview::doRender()
{
this->need_render = false;
this->renderPixbuf();
emit contentChange();
}
}
}
@ -228,6 +229,7 @@ void BasePreview::renderPixbuf()
emit contentChange();
}
this->lock_drawing->unlock();
usleep(1);
}
}
@ -318,6 +320,8 @@ void BasePreview::mouseMoveEvent(QMouseEvent* event)
need_render = true;
lock_drawing->unlock();
emit contentChange();
}
}
@ -370,6 +374,8 @@ void BasePreview::wheelEvent(QWheelEvent* event)
painter.drawImage(0, 0, part);
need_render = true;
lock_drawing->unlock();
emit contentChange();
}
else if (event->delta() < 0 && scaling < conf_scale_max)
{
@ -387,6 +393,8 @@ void BasePreview::wheelEvent(QWheelEvent* event)
painter.drawImage((width - part.width()) / 2, (height - part.height()) / 2, part);
need_render = true;
lock_drawing->unlock();
emit contentChange();
}
event->accept();
}