[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ktextwidgets] src/widgets: krichtextwidget.cpp - fix format painter changes not taking effect.
From:       Allen Winter <allen.winter () kdab ! com>
Date:       2015-09-09 1:29:50
Message-ID: E1ZZUCs-0000ve-74 () scm ! kde ! org
[Download RAW message or body]

Git commit 6775f20cdfe207a0f1f2b17562da4cc1d857bde8 by Allen Winter.
Committed on 09/09/2015 at 01:28.
Pushed by winterz into branch 'master'.

krichtextwidget.cpp - fix format painter changes not taking effect.
merged from kdelibs 51da90df9eafaeefe4b2a4a24be3af2ae18df2f8
CCBUG: 221947

M  +3    -1    src/widgets/krichtextwidget.cpp

http://commits.kde.org/ktextwidgets/6775f20cdfe207a0f1f2b17562da4cc1d857bde8

diff --git a/src/widgets/krichtextwidget.cpp b/src/widgets/krichtextwidget.cpp
index 8745b09..b95131a 100644
--- a/src/widgets/krichtextwidget.cpp
+++ b/src/widgets/krichtextwidget.cpp
@@ -673,7 +673,9 @@ void KRichTextWidget::mouseReleaseEvent(QMouseEvent *event)
         // If the painter is active, paint the selection with the
         // correct format.
         if (textCursor().hasSelection()) {
-            textCursor().setCharFormat(d->painterFormat);
+            QTextCursor c = textCursor();
+            c.setCharFormat(d->painterFormat);
+            setTextCursor(c);
         }
         d->painterActive = false;
         d->action_format_painter->setChecked(false);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic