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.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/drawing.lua b/drawing.lua
index 9bf06c7..624fad7 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -248,6 +248,11 @@ function Drawing.update()
   elseif Current_drawing_mode == 'move' then
     if Drawing.in_drawing(drawing, x, y) then
       local mx,my = Drawing.coord(x-Margin_left), Drawing.coord(y-drawing.y)
+      if drawing.mode == 'manhattan' then
+        drawing.mode = 'line'
+      elseif drawing.mode == 'rectangle' or drawing.mode == 'square' then
+        drawing.mode = 'polygon'
+      end
       drawing.pending.target_point.x = mx
       drawing.pending.target_point.y = my
     end