Avoid modifying ROI when scanning in PickActivity

detectorView.roi was modified by Rect.intersect() so we
need to make a copy to keep the currently selected ROI.
This commit is contained in:
Markus Fisch
2021-12-15 10:22:42 +01:00
parent 6cb65635e3
commit 8618a5b482
@@ -111,7 +111,7 @@ class PickActivity : AppCompatActivity() {
}
private fun scanWithinBounds(bitmap: Bitmap) {
val roi = detectorView.roi
val roi = Rect(detectorView.roi)
val rectInView = if (roi.width() < 1) {
cropImageView.getBoundsRect()
} else {