mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 04:08:13 +08:00
Fix regression with double-click in the Path tool not working (#2963)
* Fix double click in path tool not working * Remove debug line --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
08ec1d08f6
commit
f15023ef58
@@ -17,15 +17,23 @@ impl MessageHandler<DeferMessage, ()> for DeferMessageHandler {
|
||||
DeferMessage::AfterNavigationReady { messages } => {
|
||||
self.after_viewport_resize.extend_from_slice(&messages);
|
||||
}
|
||||
DeferMessage::SetGraphSubmissionIndex(execution_id) => {
|
||||
self.current_graph_submission_id = execution_id + 1;
|
||||
}
|
||||
DeferMessage::TriggerGraphRun(execution_id) => {
|
||||
self.current_graph_submission_id = execution_id;
|
||||
for message in self.after_graph_run.extract_if(.., |x| x.0 < self.current_graph_submission_id) {
|
||||
responses.push_front(message.1);
|
||||
if self.after_graph_run.is_empty() {
|
||||
return;
|
||||
}
|
||||
// Find the index of the last message we can process
|
||||
let num_elements_to_remove = self.after_graph_run.binary_search_by_key(&(execution_id + 1), |x| x.0).unwrap_or_else(|pos| pos - 1);
|
||||
let elements = self.after_graph_run.drain(0..=num_elements_to_remove);
|
||||
for (_, message) in elements.rev() {
|
||||
responses.add_front(message);
|
||||
}
|
||||
}
|
||||
DeferMessage::TriggerNavigationReady => {
|
||||
for message in self.after_viewport_resize.drain(..) {
|
||||
responses.push_front(message);
|
||||
for message in self.after_viewport_resize.drain(..).rev() {
|
||||
responses.add_front(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user