Allow only one selection in person screen

This commit is contained in:
Elias Projahn 2020-10-17 11:34:34 +02:00
parent 9a9a181739
commit 026880739c
2 changed files with 6 additions and 0 deletions

View file

@ -102,6 +102,7 @@ impl PersonScreen {
result
.work_list
.set_selected(clone!(@strong result => move |work| {
result.recording_list.clear_selection();
let navigator = result.navigator.borrow().clone();
if let Some(navigator) = navigator {
navigator.push(WorkScreen::new(result.backend.clone(), work.clone()));
@ -111,6 +112,7 @@ impl PersonScreen {
result
.recording_list
.set_selected(clone!(@strong result => move |recording| {
result.work_list.clear_selection();
let navigator = result.navigator.borrow().clone();
if let Some(navigator) = navigator {
navigator.push(RecordingScreen::new(result.backend.clone(), recording.clone()));

View file

@ -87,4 +87,8 @@ where
pub fn invalidate_filter(&self) {
self.widget.invalidate_filter();
}
pub fn clear_selection(&self) {
self.widget.unselect_all();
}
}