Fix compilation
Change-Id: I0b562f810bc12e728f59976ad8467a5ce9fd9bec Reviewed-on: http://codereview.qt-project.org/4666 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
17511e199f
commit
a15d079187
@ -72,13 +72,13 @@ MainWidget::~MainWidget()
|
|||||||
void MainWidget::mousePressEvent(QMouseEvent *e)
|
void MainWidget::mousePressEvent(QMouseEvent *e)
|
||||||
{
|
{
|
||||||
// Saving mouse press position
|
// Saving mouse press position
|
||||||
mousePressPosition = QVector2D(e->posF());
|
mousePressPosition = QVector2D(e->localPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWidget::mouseReleaseEvent(QMouseEvent *e)
|
void MainWidget::mouseReleaseEvent(QMouseEvent *e)
|
||||||
{
|
{
|
||||||
// Mouse release position - mouse press position
|
// Mouse release position - mouse press position
|
||||||
QVector2D diff = QVector2D(e->posF()) - mousePressPosition;
|
QVector2D diff = QVector2D(e->localPos()) - mousePressPosition;
|
||||||
|
|
||||||
// Rotation axis is perpendicular to the mouse position difference
|
// Rotation axis is perpendicular to the mouse position difference
|
||||||
// vector
|
// vector
|
||||||
|
Loading…
Reference in New Issue
Block a user