r16834 by craig - Backport proper #9886 fix from GSoC Tables work

scribus-commit scribus-commit at lists.scribus.net
Thu Sep 15 20:12:43 UTC 2011


Author: craig
Date: Thu Sep 15 20:12:43 2011
New Revision: 16834

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16834
Log:
Backport proper #9886 fix from GSoC Tables work

Modified:
    trunk/Scribus/scribus/canvasmode_edit.cpp

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16834&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Thu Sep 15 20:12:43 2011
@@ -205,10 +205,6 @@
 
 void CanvasMode_Edit::drawTextCursor ( QPainter *p, PageItem_TextFrame* textframe )
 {
-	//CB: If we have this test in we get no initial cursor placed for a new text frame
-	// but if we do, we crash when we resize.. #9886
-	if(textframe->lastInFrame() < 0)
-		return;
 	if ((!m_longCursorTime && m_blinkTime.elapsed() > qApp->cursorFlashTime() / 2 ) ||
 		(m_longCursorTime && m_blinkTime.elapsed() > qApp->cursorFlashTime() )
 		)
@@ -257,7 +253,7 @@
 		{
 			// Happens often when typing directly into frame.
 			// And the cursor curses nothing, vertigo.
-			textCursorPos = textframe->lastInFrame();
+			textCursorPos = qMax(0, textframe->lastInFrame());
 			QChar textCursorChar = textframe->itemText.text(textCursorPos);
 			if (textCursorChar == SpecialChars::PARSEP || textCursorChar == SpecialChars::LINEBREAK)
 			{




More information about the scribus-commit mailing list