fix: Adjust chained line angle ref dir for free drawing
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -394,6 +394,10 @@ void ViewportWidget::paintGL()
|
|||||||
if (relativeMouseAngle >= 90 || relativeMouseAngle < -90) {
|
if (relativeMouseAngle >= 90 || relativeMouseAngle < -90) {
|
||||||
refDir = -refDir;
|
refDir = -refDir;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (property("isChainedLine").toBool()) {
|
||||||
|
refDir = -refDir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double refAngle, lineAngle;
|
double refAngle, lineAngle;
|
||||||
@@ -693,6 +697,7 @@ void ViewportWidget::paintGL()
|
|||||||
QVector3D currentMouseWorldPosForText = unproject(m_currentMousePos, m_currentPlane);
|
QVector3D currentMouseWorldPosForText = unproject(m_currentMousePos, m_currentPlane);
|
||||||
QVector3D mouseVecForText = currentMouseWorldPosForText - startPos;
|
QVector3D mouseVecForText = currentMouseWorldPosForText - startPos;
|
||||||
|
|
||||||
|
if (angleFromInput) {
|
||||||
if (mouseVecForText.length() > 1e-6) {
|
if (mouseVecForText.length() > 1e-6) {
|
||||||
double mouseAngle;
|
double mouseAngle;
|
||||||
if (m_currentPlane == SketchPlane::XY) mouseAngle = qRadiansToDegrees(atan2(mouseVecForText.z(), mouseVecForText.x()));
|
if (m_currentPlane == SketchPlane::XY) mouseAngle = qRadiansToDegrees(atan2(mouseVecForText.z(), mouseVecForText.x()));
|
||||||
@@ -712,6 +717,11 @@ void ViewportWidget::paintGL()
|
|||||||
refDir = -refDir;
|
refDir = -refDir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (property("isChainedLine").toBool()) {
|
||||||
|
refDir = -refDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
double refAngle, lineAngle;
|
double refAngle, lineAngle;
|
||||||
if (m_currentPlane == SketchPlane::XY) {
|
if (m_currentPlane == SketchPlane::XY) {
|
||||||
|
|||||||
Reference in New Issue
Block a user