mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +08:00
Replace responses.push() with responses.add() everywhere (#1186)
This commit is contained in:
@@ -13,7 +13,7 @@ pub struct InputMapperMessageHandler {
|
||||
impl MessageHandler<InputMapperMessage, (&InputPreprocessorMessageHandler, ActionList)> for InputMapperMessageHandler {
|
||||
fn process_message(&mut self, message: InputMapperMessage, responses: &mut VecDeque<Message>, (input, actions): (&InputPreprocessorMessageHandler, ActionList)) {
|
||||
if let Some(message) = self.mapping.match_input_message(message, &input.keyboard, actions) {
|
||||
responses.push_back(message);
|
||||
responses.add(message);
|
||||
}
|
||||
}
|
||||
advertise_actions!();
|
||||
|
||||
@@ -92,8 +92,8 @@ impl MouseState {
|
||||
|
||||
pub fn finish_transaction(&self, drag_start: DVec2, responses: &mut VecDeque<Message>) {
|
||||
match drag_start.distance(self.position) <= DRAG_THRESHOLD {
|
||||
true => responses.push_back(DocumentMessage::AbortTransaction.into()),
|
||||
false => responses.push_back(DocumentMessage::CommitTransaction.into()),
|
||||
true => responses.add(DocumentMessage::AbortTransaction),
|
||||
false => responses.add(DocumentMessage::CommitTransaction),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user