r19224 by jghali - #12396: Undo/Redo records Multiple Duplication always with pt unit

scribus-commit scribus-commit at lists.scribus.net
Sat Jun 14 21:46:52 UTC 2014


Author: jghali
Date: Sat Jun 14 21:46:51 2014
New Revision: 19224

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19224
Log:
#12396: Undo/Redo records Multiple Duplication always with pt unit

Modified:
    branches/Version14x/Scribus/scribus/scribusdoc.cpp

Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19224&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp Sat Jun 14 21:46:51 2014
@@ -9556,7 +9556,12 @@
 			}
 			m_Selection->clear();
 		}
-		tooltip = tr("Number of copies: %1\nHorizontal shift: %2\nVertical shift: %3\nRotation: %4").arg(mdData.copyCount).arg(dH).arg(dV).arg(dR);
+		QString unitSuffix = unitGetStrFromIndex(this->unitIndex());
+		int unitPrecision = unitGetPrecisionFromIndex(this->unitIndex());
+		QString hString = QString::number(dH * docUnitRatio, 'f', unitPrecision) + " " + unitSuffix;
+		QString vString = QString::number(dV * docUnitRatio, 'f', unitPrecision) + " " + unitSuffix;
+		QString dString = QString::number(dR) + " " + unitGetStrFromIndex(SC_DEGREES);
+		tooltip = tr("Number of copies: %1\nHorizontal shift: %2\nVertical shift: %3\nRotation: %4").arg(mdData.copyCount).arg(hString).arg(vString).arg(dString);
 	}
 	else
 	if (mdData.type==1) // Create a grid of duplicated items
@@ -9586,7 +9591,11 @@
 				}
 			}
 		}
-		tooltip = tr("Number of copies: %1\nHorizontal gap: %2\nVertical gap: %3").arg(copyCount-1).arg(mdData.gridGapH).arg(mdData.gridGapV);
+		QString unitSuffix = unitGetStrFromIndex(this->unitIndex());
+		int unitPrecision = unitGetPrecisionFromIndex(this->unitIndex());
+		QString hString = QString::number(mdData.gridGapH, 'f', unitPrecision) + " " + unitSuffix;
+		QString vString = QString::number(mdData.gridGapV, 'f', unitPrecision) + " " + unitSuffix;
+		tooltip = tr("Number of copies: %1\nHorizontal gap: %2\nVertical gap: %3").arg(copyCount-1).arg(hString).arg(vString);
 	}
 	if (activeTransaction)
 	{




More information about the scribus-commit mailing list