diff --git a/src/ui/layout.rs b/src/ui/layout.rs index 39b184a..9910c55 100644 --- a/src/ui/layout.rs +++ b/src/ui/layout.rs @@ -39,12 +39,12 @@ impl Layout { view: view.as_boxed_view(), }; self.views.insert(s.clone(), screen); + self.title = title.to_owned(); self.focus = Some(s); } pub fn view, T: IntoBoxedView>(mut self, id: S, view: T, title: &str) -> Self { (&mut self).add_view(id, view, title); - self.title = title.to_owned(); self }