always initialize the Editor in crop_rotate mode

This commit is contained in:
tibbi 2018-07-23 22:07:11 +02:00
parent f8cf95991f
commit 51a36e5d85

View file

@ -177,6 +177,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
override fun onResourceReady(bitmap: Bitmap?, model: Any?, target: Target<Bitmap>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { override fun onResourceReady(bitmap: Bitmap?, model: Any?, target: Target<Bitmap>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
val currentFilter = getFiltersAdapter()?.getCurrentFilter() val currentFilter = getFiltersAdapter()?.getCurrentFilter()
if (initialBitmap == null) {
loadCropImageView()
bottomCropRotateClicked()
}
if (initialBitmap != null && currentFilter != null && currentFilter.filter.name != getString(R.string.none)) { if (initialBitmap != null && currentFilter != null && currentFilter.filter.name != getString(R.string.none)) {
default_image_view.onGlobalLayout { default_image_view.onGlobalLayout {
applyFilter(currentFilter) applyFilter(currentFilter)
@ -186,9 +191,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
} }
if (isCropIntent) { if (isCropIntent) {
loadCropImageView()
bottom_primary_filter.beGone() bottom_primary_filter.beGone()
bottomCropRotateClicked()
} }
return false return false