diff --git a/src/context.rs b/src/context.rs index 0cb8ae0..1146fdd 100644 --- a/src/context.rs +++ b/src/context.rs @@ -776,7 +776,6 @@ impl<'context, 'window> WidgetContext<'context, 'window> { cache: WidgetCacheKey { theme_mode, enabled, - invalidation: current_node.invalidation(), }, cursor, current_node, @@ -826,7 +825,6 @@ impl<'context, 'window> WidgetContext<'context, 'window> { cache: WidgetCacheKey { theme_mode, enabled: current_node.enabled(&self.handle()), - invalidation: current_node.invalidation(), }, current_node, redraw_status: self.redraw_status, @@ -1263,7 +1261,6 @@ impl MapManagedWidget for ManagedWidget { pub struct WidgetCacheKey { theme_mode: ThemeMode, enabled: bool, - invalidation: u64, } impl Default for WidgetCacheKey { @@ -1271,7 +1268,6 @@ impl Default for WidgetCacheKey { Self { theme_mode: ThemeMode::default().inverse(), enabled: false, - invalidation: u64::MAX, } } } diff --git a/src/tree.rs b/src/tree.rs index 462fbf7..afdf43f 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -45,7 +45,6 @@ impl Tree { effective_styles, theme: None, theme_mode: None, - invalidation: 0, }); data.nodes_by_id.insert(id, node_id); if widget.is_default() { @@ -282,11 +281,6 @@ impl Tree { data.widget_from_node(id, self) } - pub(crate) fn invalidation(&self, id: LotId) -> Option { - let data = self.data.lock().ignore_poison(); - data.nodes.get(id).map(|node| node.invalidation) - } - pub(crate) fn is_enabled(&self, mut id: LotId, context: &WindowHandle) -> bool { let data = self.data.lock().ignore_poison(); loop { @@ -513,7 +507,6 @@ impl TreeData { let mut node = &mut self.nodes[id]; while node.layout.is_some() { node.layout = None; - node.invalidation += 1; node.last_layout_query = None; let (true, Some(parent)) = (include_hierarchy, node.parent) else { @@ -585,7 +578,6 @@ struct Node { children: Vec, parent: Option, layout: Option>, - invalidation: u64, last_layout_query: Option, associated_styles: Option>, effective_styles: Styles, diff --git a/src/widget.rs b/src/widget.rs index 4673918..c063c23 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -1186,10 +1186,6 @@ impl ManagedWidget { self.tree.is_enabled(self.node_id, handle) } - pub(crate) fn invalidation(&self) -> u64 { - self.tree.invalidation(self.node_id).expect("missing node") - } - /// Returns true if this widget is currently the hovered widget. #[must_use] pub fn hovered(&self) -> bool {