Commit a51df3e4 authored by C. Boemann's avatar C. Boemann

More workaround for the Qt 4.8 bug

parent 5f83f8aa
......@@ -43,6 +43,7 @@ KoTextEditingPlugin::~KoTextEditingPlugin()
void KoTextEditingPlugin::selectWord(QTextCursor &cursor, int cursorPosition) const
cursor.beginEditBlock(); //needed to work around qt4.8 bug
QTextBlock block = cursor.block();
......@@ -64,6 +65,7 @@ void KoTextEditingPlugin::selectWord(QTextCursor &cursor, int cursorPosition) co
cursor.setPosition(pos + block.position(), QTextCursor::KeepAnchor);
cursor.endEditBlock(); //needed to work around qt4.8 bug (see above)
QString KoTextEditingPlugin::paragraph(QTextDocument *document, int cursorPosition) const
......@@ -1531,7 +1531,9 @@ void TextTool::repaintSelection()
QRectF TextTool::caretRect(QTextCursor *cursor) const
QTextCursor tmpCursor(*cursor);
tmpCursor.beginEditBlock(); //needed to work around qt4.8 bug
tmpCursor.setPosition(cursor->position()); // looses the anchor
QRectF rect = textRect(tmpCursor);
if (rect.size() == QSizeF(0,0)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment