r23043 by jghali - #15718: Text layout not updated when flow around shape stop overlapping text frame

scribus-commit scribus-commit at lists.scribus.net
Sat Jun 22 11:26:01 UTC 2019


Author: jghali
Date: Sat Jun 22 11:26:01 2019
New Revision: 23043

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23043
Log:
#15718: Text layout not updated when flow around shape stop overlapping text frame

Modified:
    trunk/Scribus/scribus/pageitem.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23043&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Sat Jun 22 11:26:01 2019
@@ -4666,6 +4666,11 @@
 			(oldRot != m_rotation))
 		{
 			textFlowCheckRect = getOldBoundingRect();
+			QRectF rect1 = textInteractionRegion(0.0, 0.0).boundingRect().adjusted(-1, -1, 1, 1);
+			QRectF rect2 = rect1.translated(oldXpos - m_xPos, oldYpos - m_yPos);
+			rect2.setWidth(qMax(1.0, rect1.width() + oldWidth - m_width));
+			rect2.setHeight(qMax(1.0, rect1.height() + oldHeight - m_height));
+			textFlowCheckRect = textFlowCheckRect.united(rect1.united(rect2));
 		}
 	}
 
@@ -4696,7 +4701,6 @@
 	
 	if (spreadChanges)
 	{
-		textFlowCheckRect = textFlowCheckRect.united(getBoundingRect());
 		checkTextFlowInteractions(textFlowCheckRect);
 	}
 }
@@ -9465,6 +9469,8 @@
 QRegion PageItem::textInteractionRegion(double xOffset, double yOffset) const
 {
 	QRegion res;
+	if (textFlowModeVal == TextFlowDisabled)
+		return res;
 
 	QTransform pp;
 	if (this->isGroupChild())




More information about the scribus-commit mailing list