forked from qt-creator/qt-creator
TextEditor: keep suggestion when operating tooltip
Triggering the apply word action inside the suggestion tooltip moved the
focus out of the editor. The generated focus out event cleared the
suggestion so a user could always only apply one word before the
suggestion was reset.
Amends 039a1f8ff0
Change-Id: I9f40a3de75e7091f2b5172f9a299c8ac0fad7ecf
Reviewed-by: <lie@spyro-soft.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -8326,7 +8326,8 @@ void TextEditorWidget::focusOutEvent(QFocusEvent *e)
|
|||||||
viewport()->update(d->cursorUpdateRect(d->m_cursors));
|
viewport()->update(d->cursorUpdateRect(d->m_cursors));
|
||||||
}
|
}
|
||||||
d->updateHighlights();
|
d->updateHighlights();
|
||||||
d->clearCurrentSuggestion();
|
if (!Utils::ToolTip::isVisible())
|
||||||
|
d->clearCurrentSuggestion();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorWidgetPrivate::maybeSelectLine()
|
void TextEditorWidgetPrivate::maybeSelectLine()
|
||||||
|
Reference in New Issue
Block a user