r17011 by fschmid - Better positioning of items in "PutToPatterns".
scribus-commit
scribus-commit at lists.scribus.net
Tue Nov 22 20:20:49 UTC 2011
Author: fschmid
Date: Tue Nov 22 20:20:49 2011
New Revision: 17011
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17011
Log:
Better positioning of items in "PutToPatterns".
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=17011&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Nov 22 20:20:49 2011
@@ -9839,11 +9839,12 @@
if (doc->docPatterns.contains(patternName))
doc->docPatterns.remove(patternName);
doc->addPattern(patternName, pat);
- double x = currItem->xPos();
- double y = currItem->yPos();
- double w = currItem->width();
- double h = currItem->height();
+ double x = currItem->visualXPos();
+ double y = currItem->visualYPos();
+ double w = currItem->visualWidth();
+ double h = currItem->visualHeight();
currItem->setXYPos(0, 0, true);
+ currItem->moveBy(-currItem->visualXPos() / 2.0, -currItem->visualYPos() / 2.0);
currItem->gXpos = currItem->xPos();
currItem->gYpos = currItem->yPos();
int d = doc->Items->indexOf(currItem);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17011&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Tue Nov 22 20:20:49 2011
@@ -5676,6 +5676,7 @@
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
currItem->setXYPos(0, 0, true);
+ currItem->moveBy(-currItem->visualXPos() / 2.0, -currItem->visualYPos() / 2.0);
currItem->gXpos = currItem->xPos();
currItem->gYpos = currItem->yPos();
docPatterns[currentEditedSymbol].pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
More information about the scribus-commit
mailing list