make sure the title is set for the regular and chained method
This commit is contained in:
@@ -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<S: Into<String>, T: IntoBoxedView>(mut self, id: S, view: T, title: &str) -> Self {
|
||||
(&mut self).add_view(id, view, title);
|
||||
self.title = title.to_owned();
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user