about summary refs log tree commit diff stats
path: root/drawing.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-10 11:48:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-10 11:48:32 -0700
commitc875f7be46d76650e1c6a16668f77df7227d57d3 (patch)
treec67b443c57356842bbe2c3992699ff7940f4f8c2 /drawing.lua
parent79a12413700dca5816d6c27fc4951bdd7579e329 (diff)
downloadview.love-c875f7be46d76650e1c6a16668f77df7227d57d3.tar.gz
stop saving the entire file when modifying drawings
Now we just disallow that entirely.
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)