summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 060a3da05f..b30d29e704 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -10214,10 +10214,8 @@ bool QGraphicsTextItem::sceneEvent(QEvent *event)
case QEvent::KeyRelease:
// Reset the focus widget's input context, regardless
// of how this item gained or lost focus.
- if (event->type() == QEvent::FocusIn) {
+ if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) {
qApp->inputPanel()->reset();
- } else if (event->type() == QEvent::FocusOut) {
- qApp->inputPanel()->commit();
} else {
qApp->inputPanel()->update(Qt::ImQueryInput);
}