r21310 by fschmid -
scribus-commit
scribus-commit at lists.scribus.net
Sat May 14 07:43:21 UTC 2016
Author: fschmid
Date: Sat May 14 07:43:21 2016
New Revision: 21310
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21310
Log:
Fixed Bug #14043: Ungrouping with flipped objects, objects are not positioned correctly
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21310&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sat May 14 07:43:21 2016
@@ -8829,7 +8829,7 @@
}
result.translate(ite->xPos(), ite->yPos());
result.rotate(ite->rotation());
- if (ite->isGroup() || ite->isSymbol())
+ /* if (ite->isGroup() || ite->isSymbol())
{
if (ite->imageFlippedH())
{
@@ -8841,7 +8841,7 @@
result.translate(0, ite->height());
result.scale(1, -1);
}
- }
+ }*/
if (ite == this)
return result;
if (ite->isGroup())
@@ -8851,7 +8851,7 @@
ite = itList.at(aa);
result.translate(ite->gXpos, ite->gYpos);
result.rotate(ite->rotation());
- if (ite->isGroup() || ite->isSymbol())
+ /* if (ite->isGroup() || ite->isSymbol())
{
if (ite->imageFlippedH())
{
@@ -8863,7 +8863,7 @@
result.translate(0, ite->height());
result.scale(1, -1);
}
- }
+ }*/
if (ite == this)
return result;
if (ite->isGroup())
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21310&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat May 14 07:43:21 2016
@@ -15105,43 +15105,44 @@
QTransform groupTrans = group->getTransform();
group->groupItemList.removeAll(item);
item->Parent = NULL;
- QPointF itPos = itemTrans.map(QPointF(0, 0));
double grScXi = 1.0;
double grScYi = 1.0;
getScaleFromMatrix(itemTrans, grScXi, grScYi);
double gRot = getRotationDFromMatrix(groupTrans);
sizeItem(item->width() * grScXi, item->height() * grScYi, item, false, true, false);
+ if (group->imageFlippedH())
+ {
+ groupTrans.translate(group->width(), 0);
+ groupTrans.translate(-item->width(), 0);
+ groupTrans.scale(-1, 1);
+ if (item->isImageFrame() || item->isTextFrame() || item->isLatexFrame() || item->isOSGFrame() || item->isSymbol() || item->isGroup() || item->isSpiral())
+ item->flipImageH();
+ if (item->itemType() != PageItem::Line)
+ {
+ QTransform ma;
+ ma.scale(-1, 1);
+ item->PoLine.map(ma);
+ item->PoLine.translate(item->width(), 0);
+ }
+ }
+ if (group->imageFlippedV())
+ {
+ groupTrans.translate(0, group->height());
+ groupTrans.translate(0, -item->height());
+ groupTrans.scale(1, -1);
+ if (item->isImageFrame() || item->isTextFrame() || item->isLatexFrame() || item->isOSGFrame() || item->isSymbol() || item->isGroup() || item->isSpiral())
+ item->flipImageV();
+ if (item->itemType() != PageItem::Line)
+ {
+ QTransform ma;
+ ma.scale(1, -1);
+ item->PoLine.map(ma);
+ item->PoLine.translate(0, item->height());
+ }
+ }
+ QPointF itPos = groupTrans.map(QPointF(item->gXpos * grScXi, item->gYpos * grScYi));
double nX = itPos.x();
double nY = itPos.y();
-/* if (gRot != 0)
- {
- if (itemTrans.m11() < 0)
- {
- nX -= item->width();
- if (item->isImageFrame() || item->isTextFrame() || item->isLatexFrame() || item->isOSGFrame() || item->isSymbol() || item->isGroup() || item->isSpiral())
- item->flipImageH();
- if (item->itemType() != PageItem::Line)
- {
- QTransform ma;
- ma.scale(-1, 1);
- item->PoLine.map(ma);
- item->PoLine.translate(item->width(), 0);
- }
- }
- if (itemTrans.m22() < 0)
- {
- nY -= item->height();
- if (item->isImageFrame() || item->isTextFrame() || item->isLatexFrame() || item->isOSGFrame() || item->isSymbol() || item->isGroup() || item->isSpiral())
- item->flipImageV();
- if (item->itemType() != PageItem::Line)
- {
- QTransform ma;
- ma.scale(1, -1);
- item->PoLine.map(ma);
- item->PoLine.translate(0, item->height());
- }
- }
- }*/
if (item->isTextFrame() || item->isPathText())
{
if (item->itemText.length() != 0)
More information about the scribus-commit
mailing list