From 0fe71615d0aaef96a8e64ea4c1b6dd1f039b8e83 Mon Sep 17 00:00:00 2001 From: dmackdev Date: Sun, 13 Aug 2023 07:13:51 -0400 Subject: [PATCH] Added remove method for CollapsingState. --- crates/egui/src/containers/collapsing_header.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/egui/src/containers/collapsing_header.rs b/crates/egui/src/containers/collapsing_header.rs index 00f4ff73bc3..5eda61b607c 100644 --- a/crates/egui/src/containers/collapsing_header.rs +++ b/crates/egui/src/containers/collapsing_header.rs @@ -36,6 +36,10 @@ impl CollapsingState { ctx.data_mut(|d| d.insert_persisted(self.id, self.state)); } + pub fn remove(&self, ctx: &Context) { + ctx.data_mut(|d| d.remove::(self.id)); + } + pub fn id(&self) -> Id { self.id }