File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,18 @@ public MainWindow()
49
49
}
50
50
private void OnCopy ( object sender , ExecutedRoutedEventArgs e )
51
51
{
52
- var results = _viewModel . Results ;
53
- var result = results . SelectedItem ? . Result ;
54
- if ( result != null ) // SelectedItem returns null if selection is empty.
52
+ var _NewClipboard = QueryTextBox . SelectedText ;
53
+ if ( QueryTextBox . SelectionLength == 0 )
55
54
{
56
-
57
- System . Windows . Clipboard . SetDataObject ( result . Title . ToString ( ) ) ;
55
+ var results = _viewModel . Results ;
56
+ var result = results . SelectedItem ? . Result ;
57
+ if ( result != null ) // SelectedItem returns null if selection is empty.
58
+ {
59
+ _NewClipboard = result . Title . ToString ( ) ;
60
+ }
61
+
58
62
}
63
+ System . Windows . Clipboard . SetDataObject ( _NewClipboard ) ;
59
64
e . Handled = true ;
60
65
}
61
66
private async void OnClosing ( object sender , CancelEventArgs e )
You can’t perform that action at this time.
0 commit comments