Browse Source

#309 escape to exit deformation grid

circular17 3 năm trước cách đây
mục cha
commit
ebe494da37
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      lazpaint/tools/utooldeformationgrid.pas

+ 5 - 5
lazpaint/tools/utooldeformationgrid.pas

@@ -1215,6 +1215,8 @@ begin
   deformationGridNbX:= 0;
   deformationGridNbY:= 0;
   DoingDeformation:= false;
+  deformationGrid := nil;
+  deformationGridTexCoord := nil;
 end;
 
 function TToolDeformationGrid.Render(VirtualScreen: TBGRABitmap;
@@ -1283,12 +1285,10 @@ begin
   if Key = VK_ESCAPE then
   begin
     if DoingDeformation then
-    begin
       CancelActionPartially;
-      result := OnlyRenderChange;
-      manager.QueryExitTool;
-      Key := 0;
-    end;
+    result := OnlyRenderChange;
+    manager.QueryExitTool;
+    Key := 0;
   end;
 end;