Browse Source

avoid exiting temporary move tool

Juliette ELSASS 6 months ago
parent
commit
eca9cf21d4
2 changed files with 2 additions and 1 deletions
  1. 1 1
      lazpaint/tools/utool.pas
  2. 1 0
      lazpaint/tools/utoolbasic.pas

+ 1 - 1
lazpaint/tools/utool.pas

@@ -1590,7 +1590,7 @@ end;
 
 
 function TToolManager.CheckExitTool: boolean;
 function TToolManager.CheckExitTool: boolean;
 begin
 begin
-  if FShouldExitTool then
+  if FShouldExitTool and not ToolSleeping then
   begin
   begin
     FShouldExitTool:= false;
     FShouldExitTool:= false;
     SetCurrentToolType(FSwitchAfterExitTool);
     SetCurrentToolType(FSwitchAfterExitTool);

+ 1 - 0
lazpaint/tools/utoolbasic.pas

@@ -603,6 +603,7 @@ var
   original: TVectorOriginal;
   original: TVectorOriginal;
   i: Integer;
   i: Integer;
 begin
 begin
+  if Manager.ToolSleeping then exit;
   if not Manager.Image.SelectionMaskEmpty and
   if not Manager.Image.SelectionMaskEmpty and
     not Manager.Image.SelectionLayerIsEmpty and
     not Manager.Image.SelectionLayerIsEmpty and
     IsAffineMatrixInversible(Manager.Image.SelectionTransform) then
     IsAffineMatrixInversible(Manager.Image.SelectionTransform) then