Browse Source

other cases of tool interaction

circular17 6 years ago
parent
commit
82049ac2c3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lazpaint/image/uimageaction.pas

+ 5 - 1
lazpaint/image/uimageaction.pas

@@ -1064,7 +1064,7 @@ end;
 
 procedure TImageActions.RasterizeLayer;
 begin
-  if CurrentTool in[ptMoveLayer,ptRotateLayer,ptZoomLayer,ptLayerMapping] then
+  if CurrentTool in[ptMoveLayer,ptRotateLayer,ptZoomLayer,ptLayerMapping,ptDeformation] then
     ChooseTool(ptHand);
   ToolManager.ToolCloseDontReopen;
   Image.RasterizeLayer;
@@ -1088,7 +1088,11 @@ begin
   if (Image.CurrentLayerIndex <> -1) and (Image.NbLayers > 1) then
   begin
     idx := Image.CurrentLayerIndex;
+    if CurrentTool in[ptMoveLayer,ptRotateLayer,ptZoomLayer,ptLayerMapping,ptDeformation] then
+      ChooseTool(ptHand);
+    ToolManager.ToolCloseDontReopen;
     Image.RemoveLayer;
+    ToolManager.ToolOpen;
     FInstance.ScrollLayerStackOnItem(idx);
   end;
 end;