Explorar o código

automatically exit fill tool

Unknown %!s(int64=6) %!d(string=hai) anos
pai
achega
f911ed16c7
Modificáronse 1 ficheiros con 12 adicións e 1 borrados
  1. 12 1
      vectoredit/umain.pas

+ 12 - 1
vectoredit/umain.pas

@@ -805,7 +805,7 @@ var
   imgPtF: TPointF;
   handled: boolean;
   cur: TOriginalEditorCursor;
-  addedShape: TVectorShape;
+  addedShape, curShape: TVectorShape;
 begin
   mouseState:= Shift;
   imgPtF := VirtualScreenToImgCoord(X,Y);
@@ -856,6 +856,17 @@ begin
       end;
     end;
   end;
+
+  if Assigned(vectorOriginal) and
+     Assigned(vectorOriginal.SelectedShape) then
+  begin
+    curShape := vectorOriginal.SelectedShape;
+    case currentTool of
+      ptMoveBackFillPoint: if curShape.Usermode <> vsuEditBackFill then currentTool := ptHand;
+      ptMovePenFillPoint: if curShape.Usermode <> vsuEditPenFill then currentTool := ptHand;
+      ptMoveOutlineFillPoint: if curShape.Usermode <> vsuEditOutlineFill then currentTool := ptHand;
+    end;
+  end;
 end;
 
 procedure TForm1.FormDestroy(Sender: TObject);