diff --git a/src/ViewportWidget.cpp b/src/ViewportWidget.cpp index 30462cc..b2b2120 100644 --- a/src/ViewportWidget.cpp +++ b/src/ViewportWidget.cpp @@ -702,13 +702,13 @@ void ViewportWidget::drawSelectionPlanes() }; // XY Plane (Top) - QVector xyQuad = { planeOffset, 0, planeOffset, planeOffset + planeSize, 0, planeOffset, - planeOffset + planeSize, 0, planeOffset + planeSize, planeOffset, 0, planeOffset + planeSize }; + QVector xyQuad = { planeOffset, planeOffset, 0, planeOffset + planeSize, planeOffset, 0, + planeOffset + planeSize, planeOffset + planeSize, 0, planeOffset, planeOffset + planeSize, 0 }; drawPlane(xyQuad, m_highlightedPlane == SketchPlane::XY); // XZ Plane (Front) - QVector xzQuad = { planeOffset, planeOffset, 0, planeOffset + planeSize, planeOffset, 0, - planeOffset + planeSize, planeOffset + planeSize, 0, planeOffset, planeOffset + planeSize, 0 }; + QVector xzQuad = { planeOffset, 0, planeOffset, planeOffset + planeSize, 0, planeOffset, + planeOffset + planeSize, 0, planeOffset + planeSize, planeOffset, 0, planeOffset + planeSize }; drawPlane(xzQuad, m_highlightedPlane == SketchPlane::XZ); // YZ Plane (Right) @@ -739,14 +739,14 @@ ViewportWidget::SketchPlane ViewportWidget::checkPlaneSelection(const QPoint& sc // XZ plane (Front) intersection = unproject(screenPos, SketchPlane::XZ); if (intersection.x() >= planeOffset && intersection.x() <= planeOffset + planeSize && - intersection.y() >= planeOffset && intersection.y() <= planeOffset + planeSize) { + intersection.z() >= planeOffset && intersection.z() <= planeOffset + planeSize) { return SketchPlane::XZ; } // XY plane (Top) intersection = unproject(screenPos, SketchPlane::XY); if (intersection.x() >= planeOffset && intersection.x() <= planeOffset + planeSize && - intersection.z() >= planeOffset && intersection.z() <= planeOffset + planeSize) { + intersection.y() >= planeOffset && intersection.y() <= planeOffset + planeSize) { return SketchPlane::XY; }