From 2bc87d8af5a1f037c5695987efcb0450ef1bfc8b Mon Sep 17 00:00:00 2001 From: Henrik Friedrichsen Date: Sat, 9 Mar 2019 01:11:25 +0100 Subject: [PATCH] make sure the title is set for the regular and chained method --- src/ui/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }