mirror of
https://github.com/ShareX/ShareX.git
synced 2024-08-18 19:51:39 +12:00
Scrolling capture output image won't scroll when updating values with control, if image crop failed then ignore it
This commit is contained in:
parent
578354c7eb
commit
e89aa418da
1 changed files with 10 additions and 4 deletions
|
@ -266,13 +266,14 @@ private void Clean()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CleanPictureBox()
|
private void CleanPictureBox(Image img = null)
|
||||||
{
|
{
|
||||||
Image temp = pbOutput.Image;
|
Image temp = pbOutput.Image;
|
||||||
|
|
||||||
|
pbOutput.Image = img;
|
||||||
|
|
||||||
if (temp != null)
|
if (temp != null)
|
||||||
{
|
{
|
||||||
pbOutput.Image = null;
|
|
||||||
temp.Dispose();
|
temp.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -534,8 +535,8 @@ private void CombineAndPreviewImagesFromControl()
|
||||||
{
|
{
|
||||||
if (!isBusy)
|
if (!isBusy)
|
||||||
{
|
{
|
||||||
CleanPictureBox();
|
Result = CombineImages();
|
||||||
CombineAndPreviewImages();
|
CleanPictureBox(Result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,6 +583,11 @@ private Image CombineImages()
|
||||||
}
|
}
|
||||||
|
|
||||||
newImage = ImageHelpers.CropImage(image, rect);
|
newImage = ImageHelpers.CropImage(image, rect);
|
||||||
|
|
||||||
|
if (newImage == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newImage == null)
|
if (newImage == null)
|
||||||
|
|
Loading…
Reference in a new issue