r17040 by fschmid - Fixes for "PutToPatterns" when objects are rotated.
scribus-commit
scribus-commit at lists.scribus.net
Mon Nov 28 12:08:00 UTC 2011
Author: fschmid
Date: Mon Nov 28 12:08:00 2011
New Revision: 17040
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17040
Log:
Fixes for "PutToPatterns" when objects are rotated.
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17040&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Nov 28 12:08:00 2011
@@ -9870,15 +9870,11 @@
if (doc->docPatterns.contains(patternName))
doc->docPatterns.remove(patternName);
doc->addPattern(patternName, pat);
- double x = currItem->visualXPos();
- double y = currItem->visualYPos();
- double w = currItem->visualWidth();
- double h = currItem->visualHeight();
- currItem->gXpos = currItem->xPos() - x;
- currItem->gYpos = currItem->yPos() - y;
+ currItem->gXpos = currItem->xPos() - minx;
+ currItem->gYpos = currItem->yPos() - miny;
currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
int d = doc->Items->indexOf(currItem);
- z = doc->itemAdd(PageItem::Symbol, PageItem::Rectangle, x, y, w, h, 0, CommonStrings::None, CommonStrings::None, true);
+ z = doc->itemAdd(PageItem::Symbol, PageItem::Rectangle, minx, miny, maxx - minx, maxy - miny, 0, CommonStrings::None, CommonStrings::None, true);
PageItem* groupItem = doc->Items->takeAt(z);
groupItem->setPattern(patternName);
doc->Items->replace(d, groupItem);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17040&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Nov 28 12:08:00 2011
@@ -5674,8 +5674,8 @@
miny = qMin(miny, y1);
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
- currItem->gXpos = currItem->xPos() - currItem->visualXPos();
- currItem->gYpos = currItem->yPos() - currItem->visualYPos();
+ currItem->gXpos = currItem->xPos() - minx;
+ currItem->gYpos = currItem->yPos() - miny;
currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
docPatterns[currentEditedSymbol].pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
docPatterns[currentEditedSymbol].width = maxx - minx;
More information about the scribus-commit
mailing list