r16106 by jghali - #9592, crash with sequential cutting of text : fix canvas part
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 18 23:15:50 CET 2010
Author: jghali
Date: Sat Dec 18 22:15:50 2010
New Revision: 16106
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16106
Log:
#9592, crash with sequential cutting of text : fix canvas part
Modified:
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/scribusview.cpp
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16106&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Sat Dec 18 22:15:50 2010
@@ -925,7 +925,9 @@
qDebug() << QString("layout(): backBox=%1 is no textframe!!").arg((ulong)BackBox);
else
BackBox->layout();
- return;
+ // #9592 : warning, BackBox->layout() may not layout BackBox next box
+ if (!invalid)
+ return;
}
else if (!invalid && OnMasterPage.isEmpty()) {
// qDebug() << QString("textframe: len=%1, invalid=%2 OnMasterPage=%3: no relayout").arg(itemText.length()).arg(invalid).arg(OnMasterPage);
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16106&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sat Dec 18 22:15:50 2010
@@ -1676,6 +1676,9 @@
FPoint pf(m_canvas->globalToCanvas(QPoint(x,y)));
if( m_canvas->frameHitTest(QPointF(pf.x(),pf.y()), currItem) == Canvas::INSIDE )
{
+ // #9592 : layout must be valid here, or screenToPosition() may crash
+ if (currItem->invalid)
+ currItem->layout();
if(currItem->reversed())
{ //handle Right to Left writing
FPoint point(currItem->width()-(pf.x() - currItem->xPos()), pf.y() - currItem->yPos());
More information about the scribus-commit
mailing list