core: Slightly neater way to get root_mc in context_menu.rs
This commit is contained in:
parent
c116f29821
commit
9e6a1f3234
|
@ -34,9 +34,7 @@ impl<'gc> ContextMenuState<'gc> {
|
||||||
&self.callbacks[index]
|
&self.callbacks[index]
|
||||||
}
|
}
|
||||||
pub fn build_builtin_items(&mut self, item_flags: BuiltInItemFlags, stage: Stage<'gc>) {
|
pub fn build_builtin_items(&mut self, item_flags: BuiltInItemFlags, stage: Stage<'gc>) {
|
||||||
let root_mc = if let Some(root_clip) = stage.root_clip().and_then(|c| c.as_movie_clip()) {
|
let Some(root_mc) = stage.root_clip().and_then(|c| c.as_movie_clip()) else {
|
||||||
root_clip
|
|
||||||
} else {
|
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
if item_flags.play {
|
if item_flags.play {
|
||||||
|
|
Loading…
Reference in New Issue