about summary refs log tree commit diff stats
path: root/drawing.lua
diff options
context:
space:
mode:
Diffstat (limited to 'drawing.lua')
-rw-r--r--drawing.lua7
1 files changed, 0 insertions, 7 deletions
diff --git a/drawing.lua b/drawing.lua
index acec83b..25fde99 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -206,7 +206,6 @@ function Drawing.in_drawing(drawing, x,y)
 end
 
 function Drawing.mouse_pressed(drawing, x,y, button)
-  Drawing.before = snapshot()
   if Current_drawing_mode == 'freehand' then
     drawing.pending = {mode=Current_drawing_mode, points={{x=Drawing.coord(x-16), y=Drawing.coord(y-drawing.y)}}}
   elseif Current_drawing_mode == 'line' or Current_drawing_mode == 'manhattan' then
@@ -226,7 +225,6 @@ function Drawing.mouse_pressed(drawing, x,y, button)
     print(Current_drawing_mode)
     assert(false)
   end
-  Lines.current_drawing = drawing
 end
 
 -- a couple of operations on drawings need to constantly check the state of the mouse
@@ -348,11 +346,6 @@ function Drawing.mouse_released(x,y, button)
       Lines.current_drawing = nil
     end
   end
-  save_to_disk(Lines, Filename)
-  if Drawing.before then
-    record_undo_event({before=Drawing.before, after=snapshot()})
-    Drawing.before = nil
-  end
 end
 
 function Drawing.keychord_pressed(chord)