tree nav: rename get_max_depth() to get_height()
This commit is contained in:
parent
e5d824c808
commit
445fa0bd3a
3 changed files with 9 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -59,7 +59,7 @@ pub trait TreeNav {
|
|||
TreeCursor::default()
|
||||
}
|
||||
|
||||
fn get_max_depth(&self) -> usize {
|
||||
fn get_height(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
|
|
|
@ -304,9 +304,13 @@ impl TreeNav for NestedNode {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_max_depth(&self) -> usize {
|
||||
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 {
|
||||
if let Some(tn) = self.tree_nav.get() {
|
||||
|
|
Loading…
Reference in a new issue