Fix a new non-infinite document getting a NaN zoom (#750)
This commit is contained in:
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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue