Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

fix(menu): a right-click row reports again - the report is armed before the surface closes

Jareer1bd5977f7df5
diff --git a/src/crates/concat/ui/primitives/context-menu.slint b/src/crates/concat/ui/primitives/context-menu.slint
index 2adfb4cc..4b579a60 100644
--- a/src/crates/concat/ui/primitives/context-menu.slint
+++ b/src/crates/concat/ui/primitives/context-menu.slint
@@ -224,9 +224,15 @@ export component ContextMenu inherits Rectangle {
clicked => {
// The id first, while the row still exists;
// the report after the close - see `chosen`.
+ // The timer is armed before the close, not
+ // after: closing tears down the surface this
+ // handler runs in, and anything after it
+ // never ran, so no row reported at all (#220).
+ // It still fires on the next turn of the
+ // loop, when the surface is gone.
root.chosen = item.id;
- surface.close();
report.running = true;
+ surface.close();
}
}
}