mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-10 06:35:49 +12:00
Make sure annotate tasks ran from form thread
This commit is contained in:
parent
009ee9d294
commit
b4abf36b54
1 changed files with 5 additions and 5 deletions
|
@ -901,11 +901,11 @@ private static Image AnnotateImageUsingShareX(Image img, string filePath, Region
|
||||||
using (img)
|
using (img)
|
||||||
{
|
{
|
||||||
return RegionCaptureTasks.AnnotateImage(img, filePath, options,
|
return RegionCaptureTasks.AnnotateImage(img, filePath, options,
|
||||||
(x, newFilePath) => ImageHelpers.SaveImage(x, newFilePath),
|
(x, newFilePath) => Program.MainForm.InvokeSafe(() => ImageHelpers.SaveImage(x, newFilePath)),
|
||||||
(x, newFilePath) => ImageHelpers.SaveImageFileDialog(x, newFilePath),
|
(x, newFilePath) => Program.MainForm.InvokeSafe(() => ImageHelpers.SaveImageFileDialog(x, newFilePath)),
|
||||||
x => ClipboardHelpers.CopyImage(x),
|
x => Program.MainForm.InvokeSafe(() => ClipboardHelpers.CopyImage(x)),
|
||||||
x => UploadManager.UploadImage(x),
|
x => Program.MainForm.InvokeSafe(() => UploadManager.UploadImage(x)),
|
||||||
x => PrintImage(x),
|
x => Program.MainForm.InvokeSafe(() => PrintImage(x)),
|
||||||
taskMode);
|
taskMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue