浏览代码

automatically exit fill tool

Unknown 6 年之前
父节点
当前提交
f911ed16c7
共有 1 个文件被更改,包括 12 次插入1 次删除
  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);