imageView: Skip unsupported formats when sliding
If an image with unsupported format is opened directly, the error is shown. Closes #92 Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/212>
This commit is contained in:
parent
8f55668cd6
commit
6db58463bf
5 changed files with 83 additions and 25 deletions
|
|
@ -222,6 +222,10 @@ impl LpFileModel {
|
|||
self.imp().files.borrow().last().map(|x| x.1).cloned()
|
||||
}
|
||||
|
||||
pub fn remove(&self, file: &gio::File) -> Option<gio::File> {
|
||||
self.imp().files.borrow_mut().remove(&file.uri())
|
||||
}
|
||||
|
||||
/// Currently sorts by name
|
||||
fn sort(files: &mut IndexMap<GString, gio::File>) {
|
||||
files.sort_by(|_, x, _, y| util::compare_by_name(&x.uri(), &y.uri()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue