diff options
Diffstat (limited to 'src/app.rs')
-rw-r--r-- | src/app.rs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -470,6 +470,11 @@ impl<'ctx> AppState<'ctx> { | |||
470 | self.draw(); | 470 | self.draw(); |
471 | self.canvas.present(); | 471 | self.canvas.present(); |
472 | } | 472 | } |
473 | |||
474 | pub fn quit(&mut self) { | ||
475 | let ev = self.context.event().unwrap(); | ||
476 | ev.push_event(Event::Quit { timestamp: 0u32 }); | ||
477 | } | ||
473 | } | 478 | } |
474 | 479 | ||
475 | // publicly available functions on appstate | 480 | // publicly available functions on appstate |
@@ -606,8 +611,6 @@ impl<'ctx> AppState<'ctx> { | |||
606 | } | 611 | } |
607 | } | 612 | } |
608 | Keycode::V => self.cycle_symmetry(), | 613 | Keycode::V => self.cycle_symmetry(), |
609 | // exit | ||
610 | Keycode::Escape => break 'running, | ||
611 | // undo & redo | 614 | // undo & redo |
612 | Keycode::U => { | 615 | Keycode::U => { |
613 | if let Some(op) = self.undo_stack.undo() { | 616 | if let Some(op) = self.undo_stack.undo() { |