r18691 by fschmid - Fixed Bug #10168: Snapping points not consistant
scribus-commit
scribus-commit at lists.scribus.net
Tue Jan 7 19:40:41 UTC 2014
Author: fschmid
Date: Tue Jan 7 19:40:41 2014
New Revision: 18691
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18691
Log:
Fixed Bug #10168: Snapping points not consistant
Modified:
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18691&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Tue Jan 7 19:40:41 2014
@@ -583,6 +583,20 @@
p->save();
p->setBrush(m_brush["outline"]);
p->setPen(m_pen["outline"]);
+ p->translate(currItem->visualXPos(), currItem->visualYPos());
+ p->translate(deltax, deltay);
+ if (currItem->rotation() != 0)
+ {
+ p->setRenderHint(QPainter::Antialiasing);
+ p->rotate(currItem->rotation());
+ }
+ p->scale(scalex, scaley);
+ p->drawRect(QRectF(0.0, 0.0, currItem->visualWidth()+1.0, currItem->visualHeight()+1.0));
+ p->restore();
+
+ p->save();
+ p->setBrush(m_brush["outline"]);
+ p->setPen(m_pen["outline"]);
p->translate(currItem->xPos(), currItem->yPos());
p->translate(deltax, deltay);
if (currItem->rotation() != 0)
@@ -654,6 +668,19 @@
}
#endif // GESTURE_FRAME_PREVIEW
{
+ p->save();
+ p->setBrush(m_brush["outline"]);
+ p->setPen(m_pen["outline"]);
+ p->translate(currItem->visualXPos(), currItem->visualYPos());
+ p->translate(deltax, deltay);
+ if (currItem->rotation() != 0)
+ {
+ p->setRenderHint(QPainter::Antialiasing);
+ p->rotate(currItem->rotation());
+ }
+ p->scale(scalex, scaley);
+ p->drawRect(QRectF(0.0, 0.0, currItem->visualWidth()+1.0, currItem->visualHeight()+1.0));
+ p->restore();
p->save();
p->setBrush(m_brush["outline"]);
p->setPen(m_pen["outline"]);
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18691&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Tue Jan 7 19:40:41 2014
@@ -544,7 +544,8 @@
}
double gx, gy, gh, gw;
m_objectDeltaPos.setXY(dX, dY);
- m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ // m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
// #10677 : temporary hack : we need to introduce the
// concept of item snapping points to handle better
// the various types of items
@@ -628,7 +629,8 @@
{
double gx, gy, gh, gw;
m_doc->m_Selection->setGroupRect();
- m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ // m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
int dX=qRound(newX - m_mousePressPoint.x()), dY=qRound(newY - m_mousePressPoint.y());
erf = true;
if (m->modifiers() & Qt::ControlModifier)
@@ -1083,7 +1085,7 @@
m_doc->moveGroup(m_objectDeltaPos.x(), m_objectDeltaPos.y());
m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw;
- m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
double nx = gx;
double ny = gy;
if (!m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
@@ -1101,7 +1103,7 @@
}
m_doc->moveGroup(nx-gx, ny-gy, false);
m_doc->m_Selection->setGroupRect();
- m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
+ m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
nx = gx+gw;
ny = gy+gh;
if (m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
More information about the scribus-commit
mailing list