r20552 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Nov 13 16:38:00 UTC 2015


Author: jghali
Date: Fri Nov 13 16:38:00 2015
New Revision: 20552

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20552
Log:
#13527: Deleting right text frame crashes Scribus

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20552&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Fri Nov 13 16:38:00 2015
@@ -1450,6 +1450,11 @@
 
 	// JG we should set BackBox and NextBox to NULL at a point
 	BackBox = NextBox = NULL;
+}
+
+bool PageItem::hasLinks() const
+{
+	return (BackBox != 0 || NextBox != 0);
 }
 
 //unlink selected frame from text chain

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20552&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Fri Nov 13 16:38:00 2015
@@ -455,6 +455,7 @@
 	void unlink(bool createUndo = true);
 	void link(PageItem* nextFrame, bool addPARSEP = true);
 	void dropLinks();
+	bool hasLinks() const;
 	void unlinkWithText(bool);
 	void setSampleItem(bool b) {m_sampleItem=b;}
 	const QVector<double>& dashes() const { return DashValues; }

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20552&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Fri Nov 13 16:38:00 2015
@@ -11835,7 +11835,7 @@
 		}
 		else
 		{
-			if (currItem->asTextFrame())
+			if (currItem->asTextFrame() && !currItem->hasLinks())
 			{
 				currItem->itemText.selectAll();
 				currItem->asTextFrame()->removeMarksFromText(true);




More information about the scribus-commit mailing list