Merge pull request #1017 from marcoarnulfo/feat/layer-context-add-marker
# Conflicts: # crates/ui-egui/tests/ui_blank_context_menus.rs
This commit is contained in:
@@ -1836,6 +1836,11 @@ fn handle_shortcuts_impl(app: &mut EffectcraftApp, ctx: &egui::Context, tab_only
|
||||
// comes as text.
|
||||
if !tab_only && clipboard && app.dialog.is_none() && ctx.input(|i| i.events.iter().any(|e| matches!(e, egui::Event::Text(t) if t == "*"))) {
|
||||
let bound = app.session.shortcuts().bindings().into_iter().find(|(k, _)| *k == "Num*").map(|(_, b)| (b.command.clone(), b.params.clone()));
|
||||
// As in After Effects, it marks the selected layers; only with none selected does it add
|
||||
// a composition marker (#976).
|
||||
let bound = bound.map(|(id, params)| {
|
||||
if id == "comp.addMarker" && !app.session.state.selected_layers.is_empty() { ("layer.addMarker".to_owned(), params) } else { (id, params) }
|
||||
});
|
||||
if let Some((id, params)) = bound
|
||||
&& let Err(e) = invoke(app, ctx, &id, if params.is_null() { json!({}) } else { params })
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user