image: Keep texture around until new is available

Keep previous texture around during image reloads to avoid flickering.
This commit is contained in:
Sophie Herold 2024-08-16 13:29:27 +02:00
parent 0f69aa39c5
commit be32072d7a
6 changed files with 38 additions and 20 deletions

View file

@ -97,8 +97,8 @@ impl LpImage {
if self.is_best_fit() {
let zoom_animation = imp.zoom_animation();
zoom_animation.set_value_from(dbg!(self.zoom()));
zoom_animation.set_value_to(dbg!(imp.zoom_level_best_fit_for_rotation(target.get())));
zoom_animation.set_value_from(self.zoom());
zoom_animation.set_value_to(imp.zoom_level_best_fit_for_rotation(target.get()));
zoom_animation.play();
}