r21168 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Tue Apr 5 22:57:15 UTC 2016


Author: jghali
Date: Tue Apr  5 22:57:15 2016
New Revision: 21168

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21168
Log:
#13916: [scribusBoxes] some text not displayed

Modified:
    trunk/Scribus/scribus/text/textlayout.cpp

Modified: trunk/Scribus/scribus/text/textlayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21168&path=/trunk/Scribus/scribus/text/textlayout.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textlayout.cpp	(original)
+++ trunk/Scribus/scribus/text/textlayout.cpp	Tue Apr  5 22:57:15 2016
@@ -112,7 +112,16 @@
 // Remove the last line from the list. Used when we need to backtrack on the layouting.
 void TextLayout::removeLastLine ()
 {
-	m_box->removeBox(m_box->boxes().count() - 1);
+	QList<Box*>& boxes = m_box->boxes();
+	if (boxes.isEmpty())
+		return;
+
+	GroupBox* column = dynamic_cast<GroupBox*>(boxes.last());
+	assert(column);
+
+	int lineCount = column->boxes().count();
+	if (lineCount > 0)
+		column->removeBox(lineCount - 1);
 }
 
 void TextLayout::render(TextLayoutPainter *p, PageItem *item)




More information about the scribus-commit mailing list