r14085 by jghali - #8488 : crash with Signal 0000011 on document loading Second part of the issue, fix broken copy/paste of text frames containing inline frames

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 3 00:50:19 CEST 2009


Revision: 14085
Author: jghali
Date: 2009-10-02T22:52:06.014147Z
Commit message: #8488 : crash with Signal 0000011 on document loading
Second part of the issue, fix broken copy/paste of text frames containing inline frames

Changeset: 
M  /branches/Version135/Scribus/scribus/text/storytext.cpp

Diffs:
Index: scribus/text/storytext.cpp
===================================================================
--- scribus/text/storytext.cpp	(revision 14084)
+++ scribus/text/storytext.cpp	(revision 14085)
@@ -1613,6 +1613,19 @@
 	{
 		StoryText* story = this->dig->top<StoryText>(1);
 		PageItem* obj = this->dig->top<PageItem>(0);
+		// FIXME : currently inline objects are added to doc items when parsing
+		// We have to remove them from object list and add them to the FrameItems list
+		// before inserting them in story object
+		QList<PageItem*> *items = obj->doc()->Items;
+		if (items->count() > 0)
+		{
+			if (items->last() == obj) // try a fast path first
+				items->removeLast();
+			else
+				items->removeAll(obj);
+		}
+		obj->doc()->FrameItems.append(obj);
+		obj->ItemNr = obj->doc()->FrameItems.count() - 1;
 		story->insertObject(-1, obj);
 	}
 };




More information about the scribus-commit mailing list