tree nav: rename get_max_depth() to get_height()

This commit is contained in:
Michael Sippel 2023-09-04 06:18:45 +02:00
parent e5d824c808
commit 445fa0bd3a
Signed by: senvas
GPG key ID: F96CF119C34B64A6
3 changed files with 9 additions and 5 deletions

View file

@ -483,8 +483,8 @@ impl TreeNav for TypeTermEditor {
self.cur_node.get().get_cursor_warp()
}
fn get_max_depth(&self) -> usize {
self.cur_node.get().get_max_depth()
fn get_height(&self) -> usize {
self.cur_node.get().get_height()
}
fn goby(&mut self, dir: Vector2<isize>) -> TreeNavResult {

View file

@ -59,7 +59,7 @@ pub trait TreeNav {
TreeCursor::default()
}
fn get_max_depth(&self) -> usize {
fn get_height(&self) -> usize {
0
}

View file

@ -304,8 +304,12 @@ impl TreeNav for NestedNode {
}
}
fn get_max_depth(&self) -> usize {
0
fn get_height(&self) -> usize {
if let Some(tn) = self.tree_nav.get() {
tn.read().unwrap().get_height()
} else {
0
}
}
fn goby(&mut self, direction: Vector2<isize>) -> TreeNavResult {