r20700 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Fri Jan 22 22:43:53 UTC 2016
Author: jghali
Date: Fri Jan 22 22:43:53 2016
New Revision: 20700
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20700
Log:
#11503: Horizontal mirror and arrow direction
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20700&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Jan 22 22:43:53 2016
@@ -10884,7 +10884,14 @@
if (currItem->rotation() != 0.0)
{
double ix2, iy2, iw2, ih2;
- currItem->rotateBy(currItem->rotation() * -2.0);
+ double newRotation = -currItem->rotation();
+ if (currItem->itemType() == PageItem::Line)
+ newRotation = 180 - currItem->rotation();
+ while (newRotation < 0)
+ newRotation += 360.0;
+ while (newRotation >= 360.0)
+ newRotation -= 360.0;
+ currItem->setRotation(newRotation);
currItem->setRedrawBounding();
currItem->getBoundingRect(&ix2, &iy2, &iw2, &ih2);
currItem->moveBy(ix-ix2, iy-iy2, false);
@@ -10933,7 +10940,12 @@
{
double ix2, iy2, iw2, ih2, ix, iy, iw, ih;
currItem->getBoundingRect(&ix, &iy, &iw, &ih);
- currItem->rotateBy(currItem->rotation() * -2.0);
+ double newRotation = 180 - currItem->rotation();
+ while (newRotation < 0)
+ newRotation += 360.0;
+ while (newRotation >= 360.0)
+ newRotation -= 360.0;
+ currItem->setRotation(newRotation);
currItem->setRedrawBounding();
currItem->getBoundingRect(&ix2, &iy2, &iw2, &ih2);
currItem->moveBy(ix-ix2, iy-iy2, false);
More information about the scribus-commit
mailing list