Fixed floating display issue, and
@@ -32,10 +32,33 @@ impl LayoutTree {
}
let node_ix = self.tree.lookup_id(uuid)
.ok_or(TreeError::NodeNotFound(uuid))?;
+ let parent_ix = self.tree.parent_of(node_ix)?;
+ match self.tree[parent_ix] {
+ Container::Container { layout, .. } => {
+ match layout {
+ Layout::Tabbed | Layout::Stacked => {
+ for child_ix in self.tree.children_of(parent_ix) {
+ match self.tree[child_ix] {
+ Container::View { handle, .. } => {
+ if child_ix != node_ix {
+ handle.send_to_back();
+ }
+ },
+ Container::Container { ..} => {
+ // do nothing
+ },
+ _ => unreachable!()
+ }
+ }
+ },
+ _ => {}
+ }
+ }
+ _ => {}
+ }
match self.tree[node_ix] {
Container::View { handle, .. } => {
handle.focus();
- handle.bring_to_front();
self.active_container = Some(node_ix);
},
_ => return Err(TreeError::Focus(FocusError::NotAView(uuid)))
