diff --git a/Changes.md b/Changes.md index 8618d1306c5..438c0d73876 100644 --- a/Changes.md +++ b/Changes.md @@ -5,6 +5,7 @@ Fixes ----- - RenderMan : Fixed handling of `render:{name}` attributes, such as the `render:displayColor` attribute created by StandardAttributes, and `primvar:{name}` attributes loaded from USD files. These can now be accessed by PxrAttribute shaders as either `user:{name}` or just `{name}`. +- MultiLineTextWidget : Fixed bug causing text selection highlighting to persist after the widget has lost focus. 1.5.12.0 (relative to 1.5.11.0) ======== diff --git a/python/GafferUI/MultiLineTextWidget.py b/python/GafferUI/MultiLineTextWidget.py index 1a7e316ec85..81275f5d407 100644 --- a/python/GafferUI/MultiLineTextWidget.py +++ b/python/GafferUI/MultiLineTextWidget.py @@ -587,6 +587,11 @@ def focusOutEvent( self, event ) : if widget is not None : widget._emitEditingFinished() + if event.reason() != QtCore.Qt.PopupFocusReason : + cursor = self.textCursor() + cursor.clearSelection() + self.setTextCursor( cursor ) + QtWidgets.QPlainTextEdit.focusOutEvent( self, event ) def paintEvent( self, event ) :