r22112 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun Jul 16 01:00:31 UTC 2017


Author: jghali
Date: Sun Jul 16 01:00:31 2017
New Revision: 22112

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22112
Log:
#14909: Crash when moving an image frame closed to the edge of a text frame

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22112&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Sun Jul 16 01:00:31 2017
@@ -1295,6 +1295,7 @@
 		}
 	}
 }
+
 void PageItem_TextFrame::layout()
 {
 //	qDebug()<<"==Layout==" << itemName() ;
@@ -2626,8 +2627,8 @@
 					{
 						// go back to last break position
 						i = current.breakIndex;
+						a = glyphClusters.at(i).firstChar();
 						currentIndex = i - current.lineData.firstCluster;
-						a = current.glyphs[currentIndex].firstChar();
 						style = itemText.paragraphStyle(a);
 						const_cast<ScFace&>(font) = itemText.charStyle(a).font();
 						if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
@@ -2640,7 +2641,7 @@
 					assert( i < glyphClusters.length() );
 					//glyphs = itemText.getGlyphs(a);
 					current.isEmpty = (i - current.lineData.firstCluster + 1) == 0;
-					if (current.addLine)
+					if (current.addLine && !current.isEmpty)
 					{
 						if (itemText.text(a) == ' ') {
 							current.glyphs[currentIndex].setFlag(ScLayout_SuppressSpace);




More information about the scribus-commit mailing list