Skip to content

Commit 65384a9

Browse files
committed
Fix initial crop window invalid position because reading previous image instance state.
1 parent d566d63 commit 65384a9

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ For more information, see the [GitHub Wiki](https://github.com/ArthurHub/Android
123123
*2.4.3* (WIP)
124124

125125
- Adding option to omit camera intents on getPickImageChooserIntent (thx Hugo Rossi)
126-
- Fix restore state not restoring rotation
126+
- Fix restore state not restoring rotation.
127+
- Fix initial crop window invalid position because reading previous image instance state.
127128

128129
*2.4.2*
129130

cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,8 @@ public void setImageUriAsync(Uri uri) {
896896

897897
// either no existing task is working or we canceled it, need to load new URI
898898
clearImageInt();
899+
mRestoreCropWindowRect = null;
900+
mRestoreDegreesRotated = 0;
899901
mCropOverlayView.setInitialCropWindowRect(null);
900902
mBitmapLoadingWorkerTask = new WeakReference<>(new BitmapLoadingWorkerTask(this, uri));
901903
mBitmapLoadingWorkerTask.get().execute();

0 commit comments

Comments
 (0)