r16835 by craig - Backport proper #9886 fix from GSoC Tables work
scribus-commit
scribus-commit at lists.scribus.net
Thu Sep 15 20:12:57 UTC 2011
Author: craig
Date: Thu Sep 15 20:12:57 2011
New Revision: 16835
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16835
Log:
Backport proper #9886 fix from GSoC Tables work
Modified:
branches/Version135/Scribus/scribus/canvasmode_edit.cpp
Modified: branches/Version135/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16835&path=/branches/Version135/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/canvasmode_edit.cpp (original)
+++ branches/Version135/Scribus/scribus/canvasmode_edit.cpp Thu Sep 15 20:12:57 2011
@@ -171,10 +171,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() )
)
@@ -223,7 +219,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