Движение P2P-точек
This commit is contained in:
@@ -232,6 +232,12 @@ void Canvas::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
if (draggedPoint) {
|
||||
QPointF pos = event->pos() - dragOffset;
|
||||
for (Point pair : points) {
|
||||
if (areCoincident(draggedPoint, &pair)) {
|
||||
*pair.x = pos.x();
|
||||
*pair.y = pos.y();
|
||||
}
|
||||
}
|
||||
*draggedPoint->x = pos.x();
|
||||
*draggedPoint->y = pos.y();
|
||||
update();
|
||||
|
||||
Reference in New Issue
Block a user