Remove the ability to retrieve the view's parent
This commit is contained in:
parent
7f137ed3dd
commit
e9ed40da37
10 changed files with 22 additions and 30 deletions
|
@ -2767,10 +2767,6 @@ impl<'a, 'b, V: View> ViewContext<'a, 'b, V> {
|
|||
WeakViewHandle::new(self.window_id, self.view_id)
|
||||
}
|
||||
|
||||
pub fn parent(&self) -> Option<usize> {
|
||||
self.window_context.parent(self.view_id)
|
||||
}
|
||||
|
||||
pub fn window_id(&self) -> usize {
|
||||
self.window_id
|
||||
}
|
||||
|
|
|
@ -1073,16 +1073,6 @@ impl<'a> WindowContext<'a> {
|
|||
}))
|
||||
}
|
||||
|
||||
/// Returns the id of the parent of the given view, or none if the given
|
||||
/// view is the root.
|
||||
pub(crate) fn parent(&self, view_id: usize) -> Option<usize> {
|
||||
if let Some(view_id) = self.window.parents.get(&view_id) {
|
||||
Some(*view_id)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
// Traverses the parent tree. Walks down the tree toward the passed
|
||||
// view calling visit with true. Then walks back up the tree calling visit with false.
|
||||
// If `visit` returns false this function will immediately return.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue