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