Fix: crop wasn't working after save

This commit is contained in:
Piyush मिश्रः 2022-01-14 19:10:01 +05:30
parent 329a1f857e
commit cd3a0e3324
1 changed files with 5 additions and 8 deletions

View File

@ -193,17 +193,14 @@ fn load_image(
prop.rgba = saved_prop.rgba;
prop.is_saved = true;
use_defaults = false;
let saved = prop.is_saved;
drop(prop);
if saved {
if let Some((x, y)) = saved_prop.crop_position {
cont.apply_crop_pos(x, y);
}
} else {
match crop {
match crop {
Some((x, y)) => cont.apply_crop_pos(x, y),
None => match saved_prop.crop_position {
Some((x, y)) => cont.apply_crop_pos(x, y),
None => cont.apply_crop(),
}
},
}
}
}