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

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


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

Changeset: 
M  /branches/Version135/Scribus/scribus/propertiespalette.cpp

Diffs:
Index: scribus/propertiespalette.cpp
===================================================================
--- scribus/propertiespalette.cpp	(revision 14872)
+++ scribus/propertiespalette.cpp	(revision 14873)
@@ -2759,6 +2759,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;
 	QMatrix ma;
@@ -2777,6 +2778,7 @@
 			h = CurItem->height();
 			r = CurItem->rotation();
 			ma.translate(x, y);
+			useLineMode = (LMode && CurItem->isLine());
 		}
 	}
 	else
@@ -2790,7 +2792,8 @@
 //	ma.translate(x, y);
 	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);
@@ -2814,7 +2817,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