|
|
|
@ -320,18 +320,14 @@ impl DatabaseTree {
|
|
|
|
|
fn expand(&mut self, current_selection: usize) -> Option<usize> {
|
|
|
|
|
let item = &mut self.items.tree_items.get(current_selection)?;
|
|
|
|
|
|
|
|
|
|
if item.kind().is_database() {
|
|
|
|
|
if item.kind().is_database_collapsed() {
|
|
|
|
|
self.items.expand(current_selection, false);
|
|
|
|
|
return Some(current_selection);
|
|
|
|
|
}
|
|
|
|
|
if item.kind().is_database() && item.kind().is_database_collapsed() {
|
|
|
|
|
self.items.expand(current_selection, false);
|
|
|
|
|
return Some(current_selection);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if item.kind().is_schema() {
|
|
|
|
|
if item.kind().is_schema_collapsed() {
|
|
|
|
|
self.items.expand(current_selection, false);
|
|
|
|
|
return Some(current_selection);
|
|
|
|
|
}
|
|
|
|
|
if item.kind().is_schema() && item.kind().is_schema_collapsed() {
|
|
|
|
|
self.items.expand(current_selection, false);
|
|
|
|
|
return Some(current_selection);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
None
|
|
|
|
|