Skip to content

Commit 16c8349

Browse files
committed
update bounding box in image preview when the image changes
1 parent a671166 commit 16c8349

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Gui/ViewModels/SubObjectTypes/ImageViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,18 @@ public void CropImage()
103103
if (cropRegion.Width <= 0 || cropRegion.Height <= 0)
104104
{
105105
UnderlyingImage.Mutate(i => i.Crop(new Rectangle(0, 0, 1, 1)));
106-
UnderlyingImageChanged();
107106
XOffset = 0;
108107
YOffset = 0;
109108
}
110109
else
111110
{
112111
UnderlyingImage.Mutate(i => i.Crop(cropRegion));
113-
UnderlyingImageChanged();
114112
XOffset += cropRegion.Left;
115113
YOffset += cropRegion.Top;
116114
}
117115

116+
UnderlyingImageChanged();
117+
118118
static Rectangle FindCropRegion(Image<Rgba32> image)
119119
{
120120
var minX = image.Width;

0 commit comments

Comments
 (0)