File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,15 @@ mod imp {
54
54
55
55
glib:: idle_add_local_once ( clone ! ( @weak self as widget => move || {
56
56
widget. obj( ) . default_node_changed( ) ;
57
- } ) ) ;
58
-
59
- let obj = self . obj ( ) ;
60
- let parent: & PwVolumeBox = obj. upcast_ref ( ) ;
61
- let node = parent. node_object ( ) . expect ( "nodeobj" ) ;
62
57
63
- pwvucontrol_info ! ( "sinkbox set_nodeobject {}" , node. name( ) ) ;
58
+ // TODO: Hack! Associated PwDeviceObject for a sink type PwNodeObject may not have been added to model yet at this time.
59
+ // Delay the set_nodeobject call as workaround for now.
60
+ if let Some ( node) = widget. obj( ) . node_object( ) {
61
+ widget. route_dropdown. set_nodeobject( Some ( node) ) ;
62
+ }
63
+ } ) ) ;
64
64
65
- self . route_dropdown . set_nodeobject ( Some ( node ) ) ;
65
+ pwvucontrol_info ! ( "sinkbox set_nodeobject {}" , self . obj ( ) . node_object ( ) . expect ( "Node object" ) . name ( ) ) ;
66
66
}
67
67
}
68
68
impl WidgetImpl for PwSinkBox { }
You can’t perform that action at this time.
0 commit comments