mirror of
https://github.com/Dummi26/musicdb.git
synced 2025-03-10 14:13:53 +01:00
fix crash when dragging selected element
This commit is contained in:
parent
4dcd2967a5
commit
d163d4c8c4
@ -936,16 +936,7 @@ impl GuiElem for ListArtist {
|
|||||||
let selected = self.selected.clone();
|
let selected = self.selected.clone();
|
||||||
info.actions.push(GuiAction::Do(Box::new(move |gui| {
|
info.actions.push(GuiAction::Do(Box::new(move |gui| {
|
||||||
let q = selected.as_queue(
|
let q = selected.as_queue(
|
||||||
gui.gui
|
&gui.gui.c_main_view.children.2,
|
||||||
.children()
|
|
||||||
.nth(3)
|
|
||||||
.unwrap()
|
|
||||||
.children()
|
|
||||||
.nth(2)
|
|
||||||
.unwrap()
|
|
||||||
.any()
|
|
||||||
.downcast_ref()
|
|
||||||
.unwrap(),
|
|
||||||
&gui.database.lock().unwrap(),
|
&gui.database.lock().unwrap(),
|
||||||
);
|
);
|
||||||
gui.exec_gui_action(GuiAction::SetDragging(Some((
|
gui.exec_gui_action(GuiAction::SetDragging(Some((
|
||||||
@ -1083,16 +1074,7 @@ impl GuiElem for ListAlbum {
|
|||||||
let selected = self.selected.clone();
|
let selected = self.selected.clone();
|
||||||
info.actions.push(GuiAction::Do(Box::new(move |gui| {
|
info.actions.push(GuiAction::Do(Box::new(move |gui| {
|
||||||
let q = selected.as_queue(
|
let q = selected.as_queue(
|
||||||
gui.gui
|
&gui.gui.c_main_view.children.2,
|
||||||
.children()
|
|
||||||
.nth(3)
|
|
||||||
.unwrap()
|
|
||||||
.children()
|
|
||||||
.nth(2)
|
|
||||||
.unwrap()
|
|
||||||
.any()
|
|
||||||
.downcast_ref()
|
|
||||||
.unwrap(),
|
|
||||||
&gui.database.lock().unwrap(),
|
&gui.database.lock().unwrap(),
|
||||||
);
|
);
|
||||||
gui.exec_gui_action(GuiAction::SetDragging(Some((
|
gui.exec_gui_action(GuiAction::SetDragging(Some((
|
||||||
@ -1226,16 +1208,7 @@ impl GuiElem for ListSong {
|
|||||||
let selected = self.selected.clone();
|
let selected = self.selected.clone();
|
||||||
info.actions.push(GuiAction::Do(Box::new(move |gui| {
|
info.actions.push(GuiAction::Do(Box::new(move |gui| {
|
||||||
let q = selected.as_queue(
|
let q = selected.as_queue(
|
||||||
gui.gui
|
&gui.gui.c_main_view.children.2,
|
||||||
.children()
|
|
||||||
.nth(3)
|
|
||||||
.unwrap()
|
|
||||||
.children()
|
|
||||||
.nth(2)
|
|
||||||
.unwrap()
|
|
||||||
.any()
|
|
||||||
.downcast_ref()
|
|
||||||
.unwrap(),
|
|
||||||
&gui.database.lock().unwrap(),
|
&gui.database.lock().unwrap(),
|
||||||
);
|
);
|
||||||
gui.exec_gui_action(GuiAction::SetDragging(Some((
|
gui.exec_gui_action(GuiAction::SetDragging(Some((
|
||||||
|
@ -41,7 +41,7 @@ pub struct GuiScreen {
|
|||||||
c_idle_display: IdleDisplay,
|
c_idle_display: IdleDisplay,
|
||||||
c_status_bar: StatusBar,
|
c_status_bar: StatusBar,
|
||||||
c_settings: Settings,
|
c_settings: Settings,
|
||||||
c_main_view: Panel<(
|
pub c_main_view: Panel<(
|
||||||
Button<[Label; 1]>,
|
Button<[Label; 1]>,
|
||||||
Button<[Label; 1]>,
|
Button<[Label; 1]>,
|
||||||
LibraryBrowser,
|
LibraryBrowser,
|
||||||
|
Loading…
Reference in New Issue
Block a user