r14922 by jghali - #8960: Initial drawing of a line with Ctrl doesn't produce the correct angles
scribus-commit
scribus-commit at lists.scribus.net
Sun Mar 21 20:00:36 CET 2010
Revision: 14922
Author: jghali
Date: 2010-03-21T18:59:31.914329Z
Commit message: #8960: Initial drawing of a line with Ctrl doesn't produce the correct angles
Changeset:
M /trunk/Scribus/scribus/canvasmode_create.cpp
Diffs:
Index: scribus/canvasmode_create.cpp
===================================================================
--- scribus/canvasmode_create.cpp (revision 14921)
+++ scribus/canvasmode_create.cpp (revision 14922)
@@ -254,7 +254,7 @@
}
if (m->modifiers() & Qt::ControlModifier)
{
- QRectF bounds(QPoint(createObjectPos.x(), createObjectPos.y()), QPoint(newX, newY));
+ QRectF bounds(QPointF(createObjectPos.x(), createObjectPos.y()), QPointF(newX, newY));
double newRot = xy2Deg(bounds.width(), bounds.height());
if (newRot < 0.0)
newRot += 360;
@@ -272,8 +272,10 @@
double nx = np2.x();
double ny = np2.y();
m_doc->ApplyGuides(&nx, &ny);
- newX = qRound(nx);
- newY = qRound(ny);
+ // #8959 : suppress qRound here as this prevent drawing line with angle constrain
+ // precisely and does not allow to stick precisely to grid or guides
+ newX = /*qRound(*/nx/*)*/;
+ newY = /*qRound(*/ny/*)*/;
//}
canvasCurrCoord.setXY(newX, newY);
More information about the scribus-commit
mailing list