r14565 by fschmid - DRW Importer: fixed crash when importing drawings into an existing document.

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 23 00:50:21 CET 2010


Revision: 14565
Author: fschmid
Date: 2010-01-22T23:48:33.251527Z
Commit message: DRW Importer: fixed crash when importing drawings into an existing document.

Changeset: 
M  /trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp

Diffs:
Index: scribus/plugins/import/drw/importdrw.cpp
===================================================================
--- scribus/plugins/import/drw/importdrw.cpp	(revision 14564)
+++ scribus/plugins/import/drw/importdrw.cpp	(revision 14565)
@@ -806,6 +806,11 @@
 						res.fromQPainterPath(gesPa);
 						res.translate(-selRect.x(), -selRect.y());
 						PageItem *ite = tmpSel->takeItem(0);
+						selectedItemCount = tmpSel->count();
+						for (uint i = 0; i < selectedItemCount; ++i)
+						{
+							Elements.removeAll(tmpSel->itemAt(i));
+						}
 						ite->setXYPos(popped.xoffset + m_Doc->currentPage()->xOffset(), popped.yoffset + m_Doc->currentPage()->yOffset());
 						ite->PoLine = res.copy();
 						FPoint wh = getMaxClipF(&ite->PoLine);




More information about the scribus-commit mailing list