|
@@ -364,7 +364,7 @@ type
|
|
|
procedure SelectShape(AShape: TVectorShape); overload;
|
|
|
procedure DeselectShape;
|
|
|
function GetShapesCost: integer;
|
|
|
- procedure MouseClick(APoint: TPointF; ARadius: single);
|
|
|
+ function MouseClick(APoint: TPointF; ARadius: single): boolean;
|
|
|
procedure Render(ADest: TBGRABitmap; ARenderOffset: TPoint; AMatrix: TAffineMatrix; ADraft: boolean); override;
|
|
|
procedure ConfigureEditor(AEditor: TBGRAOriginalEditor); override;
|
|
|
function CreateEditor: TBGRAOriginalEditor; override;
|
|
@@ -2623,23 +2623,36 @@ begin
|
|
|
inc(result, Shape[i].GetGenericCost);
|
|
|
end;
|
|
|
|
|
|
-procedure TVectorOriginal.MouseClick(APoint: TPointF; ARadius: single);
|
|
|
+function TVectorOriginal.MouseClick(APoint: TPointF; ARadius: single): boolean;
|
|
|
var
|
|
|
i: LongInt;
|
|
|
begin
|
|
|
for i:= FShapes.Count-1 downto 0 do
|
|
|
if FShapes[i].PointInShape(APoint) then
|
|
|
begin
|
|
|
- SelectShape(i);
|
|
|
- exit;
|
|
|
+ if SelectedShape <> FShapes[i] then
|
|
|
+ begin
|
|
|
+ SelectShape(i);
|
|
|
+ exit(true);
|
|
|
+ end else
|
|
|
+ exit(false);
|
|
|
end;
|
|
|
for i:= FShapes.Count-1 downto 0 do
|
|
|
if FShapes[i].PointInShape(APoint, ARadius) then
|
|
|
begin
|
|
|
- SelectShape(i);
|
|
|
- exit;
|
|
|
+ if SelectedShape <> FShapes[i] then
|
|
|
+ begin
|
|
|
+ SelectShape(i);
|
|
|
+ exit(true);
|
|
|
+ end else
|
|
|
+ exit(false);
|
|
|
end;
|
|
|
- DeselectShape;
|
|
|
+ if SelectedShape <> nil then
|
|
|
+ begin
|
|
|
+ DeselectShape;
|
|
|
+ exit(true);
|
|
|
+ end else
|
|
|
+ exit(false);
|
|
|
end;
|
|
|
|
|
|
procedure TVectorOriginal.Render(ADest: TBGRABitmap; ARenderOffset: TPoint; AMatrix: TAffineMatrix;
|