r15804 by jghali - #8882: Adding PARSEP in the story editor makes scribus crash if the text is justified
scribus-commit
scribus-commit at lists.scribus.net
Sun Nov 7 17:42:46 CET 2010
Author: jghali
Date: Sun Nov 7 16:42:46 2010
New Revision: 15804
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15804
Log:
#8882: Adding PARSEP in the story editor makes scribus crash if the text is justified
Modified:
trunk/Scribus/scribus/ui/storyeditor.cpp
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15804&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Sun Nov 7 16:42:46 2010
@@ -515,18 +515,15 @@
{
if (textCursor().hasSelection())
textCursor().removeSelectedText();
- insertChars(styledText);
-#if 0
+
++blockContentsChangeHook;
- QTextCursor c(textCursor());
- int pos = qMin(c.position(), StyledText.length());
+ QTextCursor cursor(textCursor());
+ int pos = qMin(cursor.position(), StyledText.length());
StyledText.insertChars(pos, styledText, true);
-// insertPlainText(editText);
- insertUpdate(pos, editText.length());
- c.setPosition(pos + editText.length());
- setTextCursor(c);
+ insertPlainText(editText);
+ cursor.setPosition(pos + editText.length());
+ setTextCursor(cursor);
--blockContentsChangeHook;
-#endif
}
}
More information about the scribus-commit
mailing list