Reject stale drawing packets before retiring Allocation gestures

This commit is contained in:
2026-09-23 22:24:14 -07:00
parent 340a5c56b0
commit 44217307f9
3 changed files with 298 additions and 0 deletions
+12
View File
@@ -1308,6 +1308,18 @@ impl App {
let preview_read_only = self.process_preview_primary().is_some();
let selection_boundary = self.multiselect_boundary();
// Reject delayed gestures before they can retire newer input ownership.
if let Message::Connection(
crate::connection_edit::Event::Endpoint(captured, _)
| crate::connection_edit::Event::Restart(captured),
) = &message
&& (self.route_context() != Some(*captured)
|| self
.connection
.as_ref()
.is_none_or(|session| session.context != *captured))
{
return Task::none();
}
if let Message::DiagramSelection(event)
| Message::StateDiagram(crate::behavior::state_edit::Event::Selection(event)) = &message
&& !self.multiselect_envelope(event)