From 3384b61aa6be14b61c39355050b6f382f7076296 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sat, 12 Mar 2022 22:14:38 +0200 Subject: [PATCH] Return egui::TextureId on removal --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3f810cff..5019216e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -341,10 +341,10 @@ impl EguiContext { } /// Removes the image handle and an Egui texture id associated with it. - pub fn remove_image(&mut self, image: &Handle) -> Option { + pub fn remove_image(&mut self, image: &Handle) -> Option { let id = self.user_textures.remove(&image.id); log::debug!("Remove image (id: {:?}, handle: {:?})", id, image); - id + id.map(egui::TextureId::User) } }