Skip to content

Commit e29d65d

Browse files
committed
Crop parameters reset when project loaded.
1 parent 12fc165 commit e29d65d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

relight/imagecropper.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ImageCropper::~ImageCropper() {}
2323
void ImageCropper::setImage(const QPixmap& _image) {
2424
image = _image;
2525
realSizeRect = QRect(QPoint(0, 0), image.size());
26+
updateDeltaAndScale();
2627
update();
2728
}
2829

@@ -70,8 +71,9 @@ QRect ImageCropper::croppedRect() {
7071
}
7172

7273
void ImageCropper::setCrop(QRect rect) {
73-
if(!rect.isValid())
74-
return;
74+
if(!rect.isValid()) {
75+
rect = realSizeRect;
76+
}
7577
enforceBounds(rect, CursorPositionMiddle);
7678
}
7779

0 commit comments

Comments
 (0)