Skip to content

Commit

Permalink
[Enh]: OCR Element - Extract #selectedText
Browse files Browse the repository at this point in the history
  • Loading branch information
seandenigris committed Oct 26, 2020
1 parent 9c334fa commit 431ee4d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ResourcesLive-GToolkit/RlhOCRElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ RlhOCRElement >> addShortcuts [
shortcut := BlShortcut new
combination: keyCombo;
action: [ :anEvent :aShortcut |
| selectedText |
selectedText := (self selection first userData at: #node) string.
self client
write: (desc fromString: selectedText)
write: (desc fromString: self selectedText)
using: desc. ].
self addShortcut: shortcut ]
]
Expand Down Expand Up @@ -85,6 +83,11 @@ RlhOCRElement >> initialize [
requestFocus.
]

{ #category : #accessing }
RlhOCRElement >> selectedText [
^ (self selection first userData at: #node) string
]

{ #category : #accessing }
RlhOCRElement >> selection [
^ self selectionHandler selected_hOCR
Expand Down

0 comments on commit 431ee4d

Please sign in to comment.