r14086 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:34 CEST 2009


Revision: 14086
Author: jghali
Date: 2009-10-02T22:52:36.026350Z
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  /trunk/Scribus/scribus/text/storytext.cpp

Diffs:
Index: scribus/text/storytext.cpp
===================================================================
--- scribus/text/storytext.cpp	(revision 14085)
+++ scribus/text/storytext.cpp	(revision 14086)
@@ -1612,6 +1612,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