|
@@ -200,13 +200,16 @@ procedure TLayerStackInterface.BGRALayerStack_MouseDown(Sender: TObject;
|
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
var i: integer;
|
|
var i: integer;
|
|
str: string;
|
|
str: string;
|
|
|
|
+ isRightClick: boolean;
|
|
begin
|
|
begin
|
|
if Assigned(LazPaintInstance) then LazPaintInstance.ExitColorEditor;
|
|
if Assigned(LazPaintInstance) then LazPaintInstance.ExitColorEditor;
|
|
X := round(X*FScaling);
|
|
X := round(X*FScaling);
|
|
Y := round(Y*FScaling);
|
|
Y := round(Y*FScaling);
|
|
if PtInRect(Point(X,Y),FScrollButtonRect) then exit;
|
|
if PtInRect(Point(X,Y),FScrollButtonRect) then exit;
|
|
- If (Button = mbLeft) then
|
|
|
|
|
|
+ isRightClick := (Button = mbRight) {$IFDEF DARWIN}or ((Button = mbLeft) and (ssCtrl in Shift)){$ENDIF};
|
|
|
|
+ If (Button = mbLeft) and not isRightClick then
|
|
begin
|
|
begin
|
|
|
|
+ FRightClickOrigin := EmptyPoint;
|
|
if ((VolatileHorzScrollBar <> nil) and VolatileHorzScrollBar.MouseDown(X,Y)) or
|
|
if ((VolatileHorzScrollBar <> nil) and VolatileHorzScrollBar.MouseDown(X,Y)) or
|
|
((VolatileVertScrollBar <> nil) and VolatileVertScrollBar.MouseDown(X,Y)) then
|
|
((VolatileVertScrollBar <> nil) and VolatileVertScrollBar.MouseDown(X,Y)) then
|
|
begin
|
|
begin
|
|
@@ -266,7 +269,7 @@ begin
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
end else
|
|
end else
|
|
- if Button = mbRight then
|
|
|
|
|
|
+ if isRightClick then
|
|
FRightClickOrigin := Point(X,Y);
|
|
FRightClickOrigin := Point(X,Y);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -312,10 +315,12 @@ var destinationIndex, prevIndex, i: integer;
|
|
indexF: single;
|
|
indexF: single;
|
|
res: TModalResult;
|
|
res: TModalResult;
|
|
topmostInfo: TTopMostInfo;
|
|
topmostInfo: TTopMostInfo;
|
|
|
|
+ isRightClick: Boolean;
|
|
begin
|
|
begin
|
|
X := round(X*FScaling);
|
|
X := round(X*FScaling);
|
|
Y := round(Y*FScaling);
|
|
Y := round(Y*FScaling);
|
|
- if Button = mbLeft then
|
|
|
|
|
|
+ isRightClick := (Button = mbRight) {$IFDEF DARWIN}or ((Button = mbLeft) and not IsEmptyPoint(FRightClickOrigin)){$ENDIF};
|
|
|
|
+ if (Button = mbLeft) and not isRightClick then
|
|
begin
|
|
begin
|
|
FMovingItemStart := false;
|
|
FMovingItemStart := false;
|
|
if FMovingItemBitmap <> nil then
|
|
if FMovingItemBitmap <> nil then
|
|
@@ -362,7 +367,7 @@ begin
|
|
FAskTransferSelectionLayerIndex := -1;
|
|
FAskTransferSelectionLayerIndex := -1;
|
|
end;
|
|
end;
|
|
end else
|
|
end else
|
|
- if (Button = mbRight) and (Abs(X - FRightClickOrigin.X) <= 2) and
|
|
|
|
|
|
+ if isRightClick and (Abs(X - FRightClickOrigin.X) <= 2) and
|
|
(Abs(Y - FRightClickOrigin.Y) <= 2) then
|
|
(Abs(Y - FRightClickOrigin.Y) <= 2) then
|
|
begin
|
|
begin
|
|
for i := 0 to high(FLayerInfo) do
|
|
for i := 0 to high(FLayerInfo) do
|