Skip to content

Commit

Permalink
Merge pull request #893 from ales-erjavec/text-annotation-focus-out
Browse files Browse the repository at this point in the history
canvas/annotations: Clear current text selection on focus out
  • Loading branch information
BlazZupan committed Dec 8, 2015
2 parents 15be74c + 222c8dc commit cf60e68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Orange/canvas/canvas/items/annotationitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def endEdit(self):
self.__textItem.document().contentsChanged.disconnect(
self.textEdited
)
cursor = self.__textItem.textCursor()
cursor.clearSelection()
self.__textItem.setTextCursor(cursor)
self.editingFinished.emit()

def __onDocumentSizeChanged(self, size):
Expand Down

0 comments on commit cf60e68

Please sign in to comment.