mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Allow only one selection in person screen
This commit is contained in:
parent
9a9a181739
commit
026880739c
2 changed files with 6 additions and 0 deletions
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -87,4 +87,8 @@ where
|
|||
pub fn invalidate_filter(&self) {
|
||||
self.widget.invalidate_filter();
|
||||
}
|
||||
|
||||
pub fn clear_selection(&self) {
|
||||
self.widget.unselect_all();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue