svg: Handle errors for additional tiles gracefully
Some SVGs run into issues when zooming in due to memory limitations. These errors are now ignored and the existing tiles are used. Issue #358
This commit is contained in:
parent
9feef50c01
commit
c3547f82fc
4 changed files with 43 additions and 24 deletions
|
|
@ -112,9 +112,6 @@ impl imp::LpImage {
|
|||
));
|
||||
}
|
||||
}
|
||||
DecoderUpdate::GenericError(err) => {
|
||||
self.set_error(Some(err));
|
||||
}
|
||||
DecoderUpdate::Animated => {
|
||||
if self.still.get() {
|
||||
// Just load the first frame
|
||||
|
|
@ -131,7 +128,18 @@ impl imp::LpImage {
|
|||
}
|
||||
}
|
||||
DecoderUpdate::SpecificError(err) => {
|
||||
self.set_specific_error(err);
|
||||
if self.obj().is_loaded() {
|
||||
log::warn!("Error occured while loading additional data: {err:?}");
|
||||
} else {
|
||||
self.set_specific_error(err);
|
||||
}
|
||||
}
|
||||
DecoderUpdate::GenericError(err) => {
|
||||
if self.obj().is_loaded() {
|
||||
log::warn!("Error occured while loading additional data: {err:?}");
|
||||
} else {
|
||||
self.set_error(Some(err));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue