improv(display): apply adjusted scale only if it changed

This commit is contained in:
Michael Aaron Murphy 2025-02-17 20:57:41 +01:00
parent 43f2652d5d
commit 646f36ff7d
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -528,10 +528,12 @@ impl Page {
}
Message::AdjustScale(scale) => {
self.adjusted_scale = scale;
if self.adjusted_scale != scale {
self.adjusted_scale = scale;
if let Some(option) = self.cache.scale_selected {
return self.set_scale(option);
if let Some(option) = self.cache.scale_selected {
return self.set_scale(option);
}
}
}