r17927 by jghali - #11223: welded items get scrambled when reopening file
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 1 23:28:05 UTC 2012
Author: jghali
Date: Sat Dec 1 23:28:05 2012
New Revision: 17927
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17927
Log:
#11223: welded items get scrambled when reopening file
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=17927&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 Sat Dec 1 23:28:05 2012
@@ -1886,10 +1886,30 @@
if (item->isNoteFrame())
docu.writeAttribute("isNoteFrame", 1);
else
- writeITEXTs(doc, docu, item);
+ writeITEXTs(doc, docu, item);
}
}
+ if (item->isWelded())
+ {
+ bool isWelded = false;
+ for (int i = 0 ; i < item->weldList.count(); i++)
+ {
+ PageItem::weldingInfo wInf = item->weldList.at(i);
+ PageItem *pIt = wInf.weldItem;
+ if (pIt == NULL)
+ {
+ qDebug() << "Saving welding info - empty pointer!!!";
+ continue;
+ }
+ if (pIt->isAutoNoteFrame())
+ continue;
+ docu.writeEmptyElement("WeldEntry");
+ docu.writeAttribute("Target", qHash(wInf.weldItem));
+ docu.writeAttribute("WX", wInf.weldPoint.x());
+ docu.writeAttribute("WY", wInf.weldPoint.y());
+ }
+ }
if (item->effectsInUse.count() != 0)
{
for (int a = 0; a < item->effectsInUse.count(); ++a)
@@ -2363,7 +2383,6 @@
docu.writeAttribute("PLINEJOIN", item->PLineJoin);
}
//write weld parameter
- //write weld parameter
if (item->isWelded())
{
bool isWelded = false;
@@ -2371,24 +2390,17 @@
{
PageItem::weldingInfo wInf = item->weldList.at(i);
PageItem *pIt = wInf.weldItem;
- if (pIt == NULL)
+ if (pIt != NULL && !pIt->isAutoNoteFrame())
{
- qDebug() << "Saving welding info - empty pointer!!!";
- continue;
+ isWelded = true;
+ break;
}
- if (pIt->isAutoNoteFrame())
- continue;
- isWelded = true;
- docu.writeEmptyElement("WeldEntry");
- docu.writeAttribute("Target", qHash(wInf.weldItem));
- docu.writeAttribute("WX", wInf.weldPoint.x());
- docu.writeAttribute("WY", wInf.weldPoint.y());
}
if (isWelded)
{
- docu.writeAttribute("isWeldItem", 1);
- docu.writeAttribute("WeldSource", qHash(item));
- }
+ docu.writeAttribute("isWeldItem", 1);
+ docu.writeAttribute("WeldSource", qHash(item));
+ }
}
if (item->asRegularPolygon())
{
More information about the scribus-commit
mailing list