From b00ea5b48ee8ae291fe72d65195ef5abe2692fe4 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 23 Aug 2024 17:13:44 -0400 Subject: [PATCH] fix: component --- widget/src/lazy/component.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs index c1fc3a95ff..bf2573e2dc 100644 --- a/widget/src/lazy/component.rs +++ b/widget/src/lazy/component.rs @@ -467,13 +467,6 @@ where overlay: Some(overlay), }))) } - fn id(&self) -> Option { - self.with_element(|element| element.as_widget().id()) - } - - fn set_id(&mut self, _id: iced_runtime::core::id::Id) { - self.with_element_mut(|element| element.as_widget_mut().set_id(_id)); - } #[cfg(feature = "a11y")] fn a11y_nodes( @@ -498,14 +491,19 @@ where fn drag_destinations( &self, - state: &Tree, + tree: &Tree, layout: Layout<'_>, renderer: &Renderer, dnd_rectangles: &mut core::clipboard::DndDestinationRectangles, ) { + let mut tree = tree + .state + .downcast_ref::>>>() + .borrow_mut(); + let mut tree = tree.as_ref().unwrap(); self.with_element(|element| { element.as_widget().drag_destinations( - &state.children[0], + &tree.children[0], layout, renderer, dnd_rectangles,