mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 05:18:11 +08:00
Fix a new non-infinite document getting a NaN zoom (#750)
This commit is contained in:
committed by
Keavon Chambers
parent
4412b983cd
commit
4025815515
@@ -61,11 +61,7 @@ impl Dispatcher {
|
|||||||
pub fn handle_message<T: Into<Message>>(&mut self, message: T) {
|
pub fn handle_message<T: Into<Message>>(&mut self, message: T) {
|
||||||
use Message::*;
|
use Message::*;
|
||||||
|
|
||||||
if let Some(first) = self.message_queues.first_mut() {
|
self.message_queues.push(VecDeque::from_iter([message.into()]));
|
||||||
first.push_back(message.into());
|
|
||||||
} else {
|
|
||||||
self.message_queues.push(VecDeque::from_iter([message.into()]));
|
|
||||||
}
|
|
||||||
|
|
||||||
while let Some(message) = self.message_queues.last_mut().and_then(VecDeque::pop_front) {
|
while let Some(message) = self.message_queues.last_mut().and_then(VecDeque::pop_front) {
|
||||||
// Skip processing of this message if it will be processed later (at the end of the shallowest level queue)
|
// Skip processing of this message if it will be processed later (at the end of the shallowest level queue)
|
||||||
|
|||||||
Reference in New Issue
Block a user