Skip to content

Commit

Permalink
perf: remove copy ocr result function when performing screenshot tran…
Browse files Browse the repository at this point in the history
…slation ZGGSONG#223
  • Loading branch information
ZGGSONG committed Oct 18, 2024
1 parent a2081e0 commit 5f4ab74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/STranslate/ViewModels/NotifyIconViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,9 @@ internal async Task ScreenshotCallbackAsync(Bitmap? bitmap, CancellationToken? t
if (_configHelper.CurrentConfig?.IsRemoveLineBreakGettingWords ?? false)
getText = StringUtil.RemoveLineBreaks(getText);
//OCR后自动复制
if (_configHelper.CurrentConfig?.IsOcrAutoCopyText ?? false)
ClipboardHelper.Copy(getText);
//https://github.com/ZGGSONG/STranslate/issues/223
//if (_configHelper.CurrentConfig?.IsOcrAutoCopyText ?? false)
// ClipboardHelper.Copy(getText);
// 如果仅有空格则移除
if (string.IsNullOrWhiteSpace(_inputViewModel.InputContent))
_inputViewModel.InputContent = "";
Expand Down
2 changes: 1 addition & 1 deletion src/STranslate/Views/Preference/CommonPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@

<DockPanel Margin="20,10">
<TextBlock Text="OCR后自动复制" />
<TextBlock Style="{DynamicResource InfoTextBlock}" ToolTip="OCR识别文本后自动复制文本内容" />
<TextBlock Style="{DynamicResource InfoTextBlock}" ToolTip="OCR界面识别文本后自动复制文本内容" />
<ToggleButton
Height="26"
HorizontalAlignment="Right"
Expand Down

0 comments on commit 5f4ab74

Please sign in to comment.