src/ui/canvas.cpp

changeset 56
fad4a5dd8dee
parent 55
cb81ecb5fb23
child 57
5c0005f63319
equal deleted inserted replaced
55:cb81ecb5fb23 56:fad4a5dd8dee
31 else 31 else
32 { 32 {
33 this->newStatusText("Position: <none>"_q); 33 this->newStatusText("Position: <none>"_q);
34 } 34 }
35 #else 35 #else
36 const QPointF originAtCamera = this->worldToCamera({1, 1, 1}); 36 const QPointF originAtCamera = this->modelToScreenCoordinates({1, 1, 1});
37 this->newStatusText("Origin at (%1, %2), cursor at (%3, %4)"_q.arg(originAtCamera.x()).arg(originAtCamera.y()).arg(event->pos().x()).arg(event->pos().y())); 37 this->newStatusText("{1,1,1} is at (%1, %2), cursor at (%3, %4)"_q.arg(originAtCamera.x()).arg(originAtCamera.y()).arg(event->pos().x()).arg(event->pos().y()));
38 #endif 38 #endif
39 const ldraw::Id id = this->pick(event->pos()); 39 const ldraw::Id id = this->pick(event->pos());
40 this->highlighted = id; 40 this->highlighted = id;
41 this->totalMouseMove += (event->pos() - this->lastMousePosition).manhattanLength(); 41 this->totalMouseMove += (event->pos() - this->lastMousePosition).manhattanLength();
42 this->lastMousePosition = event->pos(); 42 this->lastMousePosition = event->pos();

mercurial