r24588 by jghali - #16518: Inserting pages in the middle of a document distorts welded items further down
scribus-commit
scribus-commit at lists.scribus.net
Fri Mar 26 20:19:25 UTC 2021
Author: jghali
Date: Fri Mar 26 20:19:25 2021
New Revision: 24588
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24588
Log:
#16518: Inserting pages in the middle of a document distorts welded items further down
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24588&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Mar 26 20:19:25 2021
@@ -6087,6 +6087,7 @@
}
if (!isLoading())
{
+ QList<PageItem*> weldedItems;
m_undoManager->setUndoEnabled(false);
this->beginUpdate();
int docItemsCount = Items->count();
@@ -6103,7 +6104,10 @@
else if (moveObjects)
{
oldPg = pageTable[item->OwnPage];
- item->moveBy(-oldPg.oldXO + Pages->at(oldPg.newPg)->xOffset(), -oldPg.oldYO + Pages->at(oldPg.newPg)->yOffset());
+ if (item->isWelded())
+ weldedItems.append(item->itemsWeldedTo());
+ if (!weldedItems.contains(item))
+ item->moveBy(-oldPg.oldXO + Pages->at(oldPg.newPg)->xOffset(), -oldPg.oldYO + Pages->at(oldPg.newPg)->yOffset());
item->OwnPage = static_cast<int>(oldPg.newPg);
if (item->isGroup())
{
More information about the scribus-commit
mailing list