r21214 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 18 20:43:25 UTC 2016


Author: jghali
Date: Mon Apr 18 20:43:25 2016
New Revision: 21214

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21214
Log:
fix unit management issue in pathtext properties widget

Modified:
    trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp

Modified: trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21214&path=/trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	Mon Apr 18 20:43:25 2016
@@ -103,8 +103,8 @@
 			pathTextType->setCurrentIndex(m_item->textPathType);
 			flippedPathText->setChecked(m_item->textPathFlipped);
 			showCurveCheckBox->setChecked(m_item->PoShow);
-			distFromCurve->setValue(m_item->BaseOffs * -1);
-			startOffset->setValue(m_item->textToFrameDistLeft());
+			distFromCurve->showValue(m_item->BaseOffs * -1 * m_unitRatio);
+			startOffset->showValue(m_item->textToFrameDistLeft() * m_unitRatio);
 		}
 		connectSignals();
 	}
@@ -159,7 +159,7 @@
 {
 	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_item->setTextToFrameDistLeft(startOffset->value());
+	m_item->setTextToFrameDistLeft(startOffset->value() / m_unitRatio);
 	m_doc->adjustItemSize(m_item);
 	m_item->updatePolyClip();
 	m_item->update();
@@ -188,7 +188,7 @@
 {
 	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_item->BaseOffs = -distFromCurve->value();
+	m_item->BaseOffs = -distFromCurve->value() / m_unitRatio;
 	m_doc->adjustItemSize(m_item);
 	m_item->updatePolyClip();
 	m_item->update();
@@ -229,8 +229,9 @@
 	distFromCurveLabel->setText( tr("Distance from Curve:"));
 	
 	QString ptSuffix = tr(" pt");
-	startOffset->setSuffix(ptSuffix);
-	distFromCurve->setSuffix(ptSuffix);
+	QString unitSuffix = m_doc ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
+	startOffset->setSuffix(unitSuffix);
+	distFromCurve->setSuffix(unitSuffix);
 }
 
 void PropertyWidget_PathText::unitChange()




More information about the scribus-commit mailing list