aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-03-31 15:52:04 +0100
committerAkshay <[email protected]>2021-03-31 15:52:04 +0100
commit733a7df549aa7bb7a7bb727a25235f25db875ecd (patch)
tree72eb4709a548613591ba8e5ee26c1008d9e84098 /src/app.rs
parentd1b33826bcc94e1feec4eb99f5781506223e3676 (diff)
introduce basic canvas primitive functions
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app.rs b/src/app.rs
index 1263324..377c613 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -662,6 +662,11 @@ impl<'ctx> AppState<'ctx> {
662 self.apply_operation(op, OpKind::Undo); 662 self.apply_operation(op, OpKind::Undo);
663 } 663 }
664 } 664 }
665 Keycode::R => {
666 if let Some(op) = self.undo_stack.redo() {
667 self.apply_operation(op, OpKind::Redo);
668 }
669 }
665 // export to file 670 // export to file
666 Keycode::N => { 671 Keycode::N => {
667 let image = self.export(); 672 let image = self.export();
@@ -670,11 +675,6 @@ impl<'ctx> AppState<'ctx> {
670 eprintln!("writing to file"); 675 eprintln!("writing to file");
671 buffer.write_all(&encoded[..]).unwrap(); 676 buffer.write_all(&encoded[..]).unwrap();
672 } 677 }
673 Keycode::R => {
674 if let Some(op) = self.undo_stack.redo() {
675 self.apply_operation(op, OpKind::Redo);
676 }
677 }
678 _ => (), 678 _ => (),
679 } 679 }
680 } 680 }