r14872 by jghali - #8890: incorrect XYZ tab measurements for straight lines

scribus-commit scribus-commit at lists.scribus.net
Fri Mar 12 00:20:22 CET 2010


Revision: 14872
Author: jghali
Date: 2010-03-11T23:18:04.675395Z
Commit message: #8890: incorrect XYZ tab measurements for straight lines

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp

Diffs:
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 14871)
+++ scribus/ui/propertiespalette.cpp	(revision 14872)
@@ -2257,6 +2257,7 @@
 		return;
 	disconnect(Xpos, SIGNAL(valueChanged(double)), this, SLOT(NewX()));
 	disconnect(Ypos, SIGNAL(valueChanged(double)), this, SLOT(NewY()));
+	bool useLineMode = false;
 	bool tmp = HaveItem;
 	double inX, inY, b, h, r, dummy1, dummy2;
 	QTransform ma;
@@ -2275,6 +2276,7 @@
 			h = CurItem->height();
 			r = CurItem->rotation();
 			ma.translate(x, y);
+			useLineMode = (LMode && CurItem->isLine());
 		}
 	}
 	else
@@ -2287,7 +2289,8 @@
 	HaveItem = false;
 	ma.rotate(r);
 	int bp = RotationGroup->checkedId();
-	if (bp == 0)
+	// #8890 : basepoint is meaningless when lines use "end points" mode
+	if (bp == 0 || useLineMode)
 		n = FPoint(0.0, 0.0);
 	else if (bp == 1)
 		n = FPoint(b, 0.0);
@@ -2311,7 +2314,7 @@
 	}
 	Xpos->setValue(inX*m_unitRatio);
 	Ypos->setValue(inY*m_unitRatio);
-	if ((LMode) && (tmp))
+	if (useLineMode)
 		setBH(CurItem->width(), CurItem->height());
 	HaveItem = tmp;
 	connect(Xpos, SIGNAL(valueChanged(double)), this, SLOT(NewX()));




More information about the scribus-commit mailing list