r22782 by jghali - #15500: Text chain duplicated after saving document
scribus-commit
scribus-commit at lists.scribus.net
Mon Dec 10 00:07:23 UTC 2018
Author: jghali
Date: Mon Dec 10 00:07:23 2018
New Revision: 22782
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22782
Log:
#15500: Text chain duplicated after saving document
Modified:
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22782&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Mon Dec 10 00:07:23 2018
@@ -66,8 +66,7 @@
ResourceCollection lists;
QList<PageItem*> emG;
QList<PageItem*> emF;
- emG.clear();
- emF.clear();
+
for (int cor = 0; cor < selection->count(); ++cor)
{
PageItem *currItem = selection->itemAt(cor);
@@ -95,6 +94,7 @@
}
}
}
+
QList<QString>::Iterator it;
QList<QString> names = lists.styleNames();
QList<int> styleList = m_Doc->getSortedStyleList();
@@ -2016,8 +2016,12 @@
docu.writeAttribute("NEXTITEM", qHash(item->nextInChain()) & 0x7FFFFFFF);
else
docu.writeAttribute("NEXTITEM", -1);
+
+ PageItem* prevTopParent = item->prevInChain();
+ while (prevTopParent && prevTopParent->Parent)
+ prevTopParent = prevTopParent->Parent;
- if (item->prevInChain() != nullptr && items->contains(item->prevInChain()))
+ if (item->prevInChain() != nullptr && items->contains(prevTopParent))
docu.writeAttribute("BACKITEM", qHash(item->prevInChain()) & 0x7FFFFFFF);
else
{
More information about the scribus-commit
mailing list