r23640 by jghali - Remove a bunch of useless Selection::setGroupRect() calls : getGroupRect() and getVisualGroupRect() call this function automatically
scribus-commit
scribus-commit at lists.scribus.net
Wed Apr 22 00:35:10 UTC 2020
Author: jghali
Date: Wed Apr 22 00:35:10 2020
New Revision: 23640
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23640
Log:
Remove a bunch of useless Selection::setGroupRect() calls : getGroupRect() and getVisualGroupRect() call this function automatically
Modified:
trunk/Scribus/scribus/canvas.cpp
trunk/Scribus/scribus/canvasgesture_resize.cpp
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_copyproperties.cpp
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/canvasmode_framelinks.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/canvasmode_rotate.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Wed Apr 22 00:35:10 2020
@@ -1169,9 +1169,7 @@
if (selectedItemCount >= moveWithBoxesOnlyThreshold)
{
double gx, gy, gw, gh;
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- //QPoint out = contentsToViewport(QPoint(0, 0));
pp->translate(gx, gy);
pp->drawRect(QRectF(0.0, 0.0, gw, gh));
return;
@@ -2427,7 +2425,6 @@
double gx, gy, gh, gw, r;
if (m_doc->m_Selection->isMultipleSelection())
{
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
r = 0.0;
}
Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp (original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp Wed Apr 22 00:35:10 2020
@@ -172,7 +172,6 @@
else if (m_doc->m_Selection->isMultipleSelection())
{
double x, y, w, h;
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
double scx = localRect.width() / w;
double scy = localRect.height() / h;
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Wed Apr 22 00:35:10 2020
@@ -326,7 +326,6 @@
psx->setPen(m_pen["selection-group"]);
double lineAdjust(psx->pen().width() / m_canvas->scale());
double x, y, w, h;
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&x, &y, &w, &h);
psx->translate(x,y);
@@ -577,7 +576,6 @@
else if (m_doc->m_Selection->count() > 1)
{
double x, y, w, h;
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
int docSelectionCount = m_doc->m_Selection->count();
if (docSelectionCount < m_canvas->moveWithBoxesOnlyThreshold)
Modified: trunk/Scribus/scribus/canvasmode_copyproperties.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasmode_copyproperties.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.cpp Wed Apr 22 00:35:10 2020
@@ -333,7 +333,6 @@
PageItem *bb = m_doc->m_Selection->itemAt(aa);
bb->update();
}
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->getGroupRectScreen(&x, &y, &w, &h);
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Wed Apr 22 00:35:10 2020
@@ -766,7 +766,6 @@
{
m_view->startGroupTransaction(Um::Move, "", Um::IMove);
}
- m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
double nx = gx;
@@ -774,23 +773,22 @@
if (!m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
{
FPoint npx = m_doc->ApplyGridF(FPoint(gx, gy));
- FPoint npw = m_doc->ApplyGridF(FPoint(gx+gw, gy+gh));
- if ((fabs(gx-npx.x())) > (fabs((gx+gw)-npw.x())))
+ FPoint npw = m_doc->ApplyGridF(FPoint(gx + gw, gy + gh));
+ if ((fabs(gx - npx.x())) > (fabs((gx + gw) - npw.x())))
nx = npw.x() - gw;
else
nx = npx.x();
- if ((fabs(gy-npx.y())) > (fabs((gy+gh)-npw.y())))
+ if ((fabs(gy - npx.y())) > (fabs((gy + gh) - npw.y())))
ny = npw.y() - gh;
else
ny = npx.y();
}
- m_doc->moveGroup(nx-gx, ny-gy);
- m_doc->m_Selection->setGroupRect();
+ m_doc->moveGroup(nx - gx, ny - gy);
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- nx = gx+gw;
- ny = gy+gh;
+ nx = gx + gw;
+ ny = gy + gh;
if (m_doc->ApplyGuides(&nx, &ny) || m_doc->ApplyGuides(&nx,&ny,true))
- m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh));
+ m_doc->moveGroup(nx - (gx + gw), ny - (gy + gh));
m_doc->m_Selection->setGroupRect();
}
else
@@ -802,16 +800,15 @@
double ny = currItem->yPos();
if (!m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
{
- m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
FPoint npx = m_doc->ApplyGridF(FPoint(gx, gy));
- FPoint npw = m_doc->ApplyGridF(FPoint(gx+gw, gy+gh));
- if ((fabs(gx-npx.x())) > (fabs((gx+gw)-npw.x())))
+ FPoint npw = m_doc->ApplyGridF(FPoint(gx + gw, gy + gh));
+ if ((fabs(gx - npx.x())) > (fabs((gx + gw) - npw.x())))
nx = npw.x() - gw;
else
nx = npx.x();
- if ((fabs(gy-npx.y())) > (fabs((gy+gh)-npw.y())))
+ if ((fabs(gy - npx.y())) > (fabs((gy + gh) - npw.y())))
ny = npw.y() - gh;
else
ny = npx.y();
@@ -826,8 +823,8 @@
{
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- FPoint maxSize(gx+gw+m_doc->scratch()->right(), gy+gh+m_doc->scratch()->bottom());
- FPoint minSize(gx-m_doc->scratch()->left(), gy-m_doc->scratch()->top());
+ FPoint maxSize(gx + gw + m_doc->scratch()->right(), gy + gh + m_doc->scratch()->bottom());
+ FPoint minSize(gx - m_doc->scratch()->left(), gy - m_doc->scratch()->top());
m_doc->adjustCanvas(minSize, maxSize);
}
m_doc->setRedrawBounding(currItem);
@@ -891,7 +888,6 @@
m_doc->m_Selection->delaySignalsOff();
if (m_doc->m_Selection->count() > 1)
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->getGroupRectScreen(&x, &y, &w, &h);
@@ -905,7 +901,6 @@
{
if (m_doc->m_Selection->count() > 1)
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_canvas->m_viewMode.operItemMoving = false;
@@ -1057,7 +1052,6 @@
m_doc->m_Selection->delaySignalsOff();
if (m_doc->m_Selection->count() > 1)
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->getGroupRectScreen(&x, &y, &w, &h);
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Wed Apr 22 00:35:10 2020
@@ -489,7 +489,6 @@
PageItem *bb = m_doc->m_Selection->itemAt(aa);
bb->update();
}
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->getGroupRectScreen(&x, &y, &w, &h);
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Wed Apr 22 00:35:10 2020
@@ -309,7 +309,6 @@
if (m_doc->m_Selection->count() > 0)
{
double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(), mousePointDoc.y()), QRectF(gx, gy, gw, gh));
}
@@ -607,7 +606,6 @@
}
if (m_doc->SnapGrid)
{
- m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw, gxo, gyo;
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
gx += m_objectDeltaPos.x();
@@ -625,7 +623,6 @@
else
{
double gx, gy, gh, gw;
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
int dX = qRound(newX - m_mousePressPoint.x()), dY = qRound(newY - m_mousePressPoint.y());
erf = true;
@@ -1042,7 +1039,6 @@
if (m_doc->m_Selection->isMultipleSelection())
{
m_doc->moveGroup(m_objectDeltaPos.x(), m_objectDeltaPos.y());
- m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw;
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
double nx = gx;
@@ -1053,13 +1049,12 @@
nx = nr.x();
ny = nr.y();
}
- m_doc->moveGroup(nx-gx, ny-gy);
- m_doc->m_Selection->setGroupRect();
+ m_doc->moveGroup(nx - gx, ny - gy);
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
- nx = gx+gw;
- ny = gy+gh;
+ nx = gx + gw;
+ ny = gy + gh;
if (m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
- m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh));
+ m_doc->moveGroup(nx - (gx + gw), ny - (gy + gh));
m_doc->m_Selection->setGroupRect();
}
else
@@ -1072,7 +1067,6 @@
double ny = currItem->yPos();
if (!m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
{
- m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw, gxo, gyo;
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
gxo = gx;
@@ -1181,7 +1175,6 @@
m_doc->m_Selection->delaySignalsOff();
if (m_doc->m_Selection->count() > 1)
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->getGroupRectScreen(&x, &y, &w, &h);
@@ -1206,7 +1199,6 @@
{
if (m_doc->m_Selection->count() > 1)
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_canvas->m_viewMode.operItemMoving = false;
@@ -1582,7 +1574,6 @@
if (m_doc->m_Selection->count() > 0)
{
double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(), mousePointDoc.y()), QRectF(gx, gy, gw, gh));
}
@@ -1726,7 +1717,6 @@
bb->update();
}
m_doc->endUpdate();
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->getGroupRectScreen(&x, &y, &w, &h);
@@ -1753,7 +1743,6 @@
if (m_doc->m_Selection->count() > 0)
{
double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(), mousePointDoc.y()), QRectF(gx, gy, gw, gh));
}
Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp Wed Apr 22 00:35:10 2020
@@ -352,7 +352,6 @@
{
if (m_doc->m_Selection->count() > 1)
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->updateContents(QRect(static_cast<int>(x - 5), static_cast<int>(y - 5), static_cast<int>(w + 10), static_cast<int>(h + 10)));
@@ -514,7 +513,6 @@
double x, y, w, h;
m_doc->setRotationMode(m_oldRotMode);
m_view->RCenter = m_oldRotCenter;
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
m_view->updateContents(QRect(static_cast<int>(x - 5), static_cast<int>(y - 5), static_cast<int>(w + 10), static_cast<int>(h + 10)));
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Wed Apr 22 00:35:10 2020
@@ -224,6 +224,14 @@
itemRemapF.clear();
itemNextF.clear();
FrameItems.clear();
+ LinkID.clear();
+
+ markeredItemsMap.clear();
+ markeredMarksMap.clear();
+ nsetRangeItemNamesMap.clear();
+ notesFramesData.clear();
+ notesMasterMarks.clear();
+ notesNSets.clear();
bool firstElement = true;
bool success = true;
@@ -491,6 +499,10 @@
}
}
}
+
+ //update names to pointers
+ updateNames2Ptr();
+
if (itemNext.count() != 0)
{
QMap<int,int>::Iterator lc;
@@ -595,6 +607,10 @@
}
}
}
+
+ //update names to pointers
+ updateNames2Ptr();
+
// reestablish textframe links
if (itemNext.count() != 0)
{
@@ -4378,9 +4394,9 @@
QStack< QList<PageItem*> > groupStack;
QStack< QList<PageItem*> > groupStackP;
QStack<int> groupStack2;
- QMap<int,PageItem*> TableID2;
+ QMap<int, PageItem*> TableID2;
QList<PageItem*> TableItems2;
- QMap<int,PageItem*> WeldID;
+ QMap<int, PageItem*> WeldID;
QList<PageItem*> WeldItems;
pat.setDoc(doc);
@@ -6137,9 +6153,9 @@
ScPage* newPage = nullptr;
- QMap<int,PageItem*> TableID;
+ QMap<int, PageItem*> TableID;
QList<PageItem*> TableItems;
- QMap<int,PageItem*> WeldID;
+ QMap<int, PageItem*> WeldID;
QList<PageItem*> WeldItems;
QStack< QList<PageItem*> > groupStackFI;
QStack< QList<PageItem*> > groupStackMI;
@@ -6175,6 +6191,7 @@
FrameItems.clear();
WeldItems.clear();
WeldID.clear();
+ LinkID.clear();
markeredItemsMap.clear();
markeredMarksMap.clear();
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Apr 22 00:35:10 2020
@@ -4902,7 +4902,6 @@
}
if (isGroup)
doc->GroupCounter++;
- doc->m_Selection->setGroupRect();
doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
PageItem* currItem3 = doc->Items->at(ac);
currItem3->isEmbedded = true;
@@ -4975,7 +4974,6 @@
doc->m_Selection->clear();
doc->m_Selection->delaySignalsOn();
doc->m_Selection->addItem(retObj);
- doc->m_Selection->setGroupRect();
double gx, gy, gh, gw;
doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
retObj->isEmbedded = true;
@@ -9069,7 +9067,6 @@
}
if (isGroup)
doc->GroupCounter++;
- doc->m_Selection->setGroupRect();
doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
PageItem* currItem3 = doc->Items->at(ac);
currItem3->isEmbedded = true;
@@ -9133,7 +9130,6 @@
}
if (isGroup)
doc->GroupCounter++;
- doc->m_Selection->setGroupRect();
doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
PageItem* currItem3 = doc->Items->at(ac);
currItem3->isEmbedded = true;
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Apr 22 00:35:10 2020
@@ -1876,7 +1876,6 @@
if (isUndo)
{
tempSelect.addItem(select.last());
- tempSelect.setGroupRect();
tempSelect.getGroupRect(&x, &y, &w, &h);
itemSelection_UnGroupObjects(&tempSelect);
}
@@ -1884,7 +1883,6 @@
{
for (int i = 0; i < select.size()-1; ++i)
tempSelect.addItem(select.at(i));
- tempSelect.setGroupRect();
tempSelect.getGroupRect(&x, &y, &w, &h);
select.removeLast();
select.append(itemSelection_GroupObjects(false, false,&tempSelect));
@@ -13614,7 +13612,7 @@
}
dH2 += dH;
dV2 += dV;
- if (mdData.copyShiftOrGap==1)
+ if (mdData.copyShiftOrGap == 1)
{
if (dH != 0.0)
dH2 += m_Selection->width();
@@ -14679,7 +14677,6 @@
PageItem* currItem;
double gx, gy, gw, gh;
- itemSelection->setGroupRect();
itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
QRectF oldRect = QRectF(gx, gy, gw, gh);
QList<PageItem*> weldL;
@@ -14693,7 +14690,6 @@
moveItem(x, y, currItem);
}
}
- itemSelection->setGroupRect();
itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
if (itemSelection->isMultipleSelection())
{
@@ -14753,9 +14749,8 @@
}
currItem = itemSelection->itemAt(0);
GroupOnPage(currItem);
- itemSelection->setGroupRect();
itemSelection->getGroupRect(&gxS, &gyS, &gwS, &ghS);
- regionsChanged()->update(QRectF(gxS-5, gyS-5, gwS+10, ghS+10).united(oldR));
+ regionsChanged()->update(QRectF(gxS - 5, gyS - 5, gwS + 10, ghS + 10).united(oldR));
}
void ScribusDoc::scaleGroup(double scx, double scy, bool scaleText, Selection* customSelection, bool scaleLine)
@@ -14958,7 +14953,6 @@
}
item = itemSelection->itemAt(0);
GroupOnPage(item);
- itemSelection->setGroupRect();
itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
m_rotMode = drm;
if ((m_rotMode != 0) && (!isLoading()))
@@ -14981,7 +14975,6 @@
}
updateManager()->setUpdatesEnabled();
regionsChanged()->update(QRectF(gx - 5, gy - 5, gw + 10, gh + 10).united(oldR));
- itemSelection->setGroupRect();
itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
for (int i = 0; i < selectedItemCount; ++i)
{
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Wed Apr 22 00:35:10 2020
@@ -1285,7 +1285,6 @@
if (m_doc->m_Selection->count() > 1)
{
m_doc->m_Selection->connectItemToGUI();
- m_doc->m_Selection->setGroupRect();
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
double nx = gx;
@@ -1298,15 +1297,13 @@
ny = npx.y();
}
activeTransaction = undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::Move, "", Um::IMove);
- m_doc->moveGroup(nx-gx, ny-gy);
- m_doc->m_Selection->setGroupRect();
+ m_doc->moveGroup(nx - gx, ny - gy);
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- nx = gx+gw;
- ny = gy+gh;
+ nx = gx + gw;
+ ny = gy + gh;
m_doc->ApplyGuides(&nx, &ny);
m_doc->ApplyGuides(&nx, &ny,true);
- m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh));
- m_doc->m_Selection->setGroupRect();
+ m_doc->moveGroup(nx - (gx + gw), ny - (gy + gh));
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
for (int a = 0; a < m_doc->m_Selection->count(); ++a)
{
@@ -1337,7 +1334,7 @@
nx = npx.x();
ny = npx.y();
}
- m_doc->moveItem(nx-currItem->xPos(), ny-currItem->yPos(), currItem);
+ m_doc->moveItem(nx - currItem->xPos(), ny - currItem->yPos(), currItem);
}
}
if ((m_doc->m_Selection->count() > 0) && (m_doc->appMode != modeNormal))
@@ -1834,7 +1831,6 @@
}
if (draw && !m_doc->m_Selection->isEmpty())
{
- m_doc->m_Selection->setGroupRect();
double x, y, w, h;
m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
getGroupRectScreen(&x, &y, &w, &h);
@@ -1900,10 +1896,8 @@
if (newObjects.count() > 1)
{
double gx, gy, gh, gw;
- newObjects.setGroupRect();
newObjects.getGroupRect(&gx, &gy, &gw, &gh);
m_doc->moveGroup(dragX - gx, dragY - gy, &newObjects);
- newObjects.setGroupRect();
newObjects.getGroupRect(&gx, &gy, &gw, &gh);
double nx = gx;
double ny = gy;
@@ -1914,15 +1908,13 @@
nx = npx.x();
ny = npx.y();
}
- m_doc->moveGroup(nx-gx, ny-gy, &newObjects);
- newObjects.setGroupRect();
+ m_doc->moveGroup(nx - gx, ny - gy, &newObjects);
newObjects.getGroupRect(&gx, &gy, &gw, &gh);
- nx = gx+gw;
- ny = gy+gh;
+ nx = gx + gw;
+ ny = gy + gh;
m_doc->ApplyGuides(&nx, &ny);
m_doc->ApplyGuides(&nx, &ny,true);
- m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh), &newObjects);
- newObjects.setGroupRect();
+ m_doc->moveGroup(nx - (gx + gw), ny - (gy + gh), &newObjects);
newObjects.getGroupRect(&gx, &gy, &gw, &gh);
emit ItemGeom();
emit HaveSel();
@@ -1941,7 +1933,7 @@
nx = npx.x();
ny = npx.y();
}
- m_doc->moveItem(nx-currItem->xPos(), ny-currItem->yPos(), currItem);
+ m_doc->moveItem(nx - currItem->xPos(), ny - currItem->yPos(), currItem);
}
currItem->emitAllToGUI();
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23640&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp Wed Apr 22 00:35:10 2020
@@ -1034,7 +1034,6 @@
m_doc->setRotationMode(m);
if (m_doc->m_Selection->isMultipleSelection())
{
- m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
if (m == 0)
{
More information about the scribus-commit
mailing list