From 8ee506ec374c950c1e66cbb3dbbe4edc2a566085 Mon Sep 17 00:00:00 2001 From: dmackdev <79006698+dmackdev@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:57:07 +0100 Subject: [PATCH] Added remove method for CollapsingState. (#3252) --- 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 00f4ff73..5eda61b6 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 }