|
|
@@ -276,6 +276,8 @@ type
|
|
|
function DragCompleteFileList: Boolean; override;
|
|
|
function DDExecute: TDragResult; override;
|
|
|
|
|
|
+ procedure PasteFromClipBoard(Node: TTreeNode);
|
|
|
+
|
|
|
public
|
|
|
property Images;
|
|
|
property StateImages;
|
|
|
@@ -293,7 +295,6 @@ type
|
|
|
function CopyToClipBoard(Node: TTreeNode): Boolean; dynamic;
|
|
|
function CutToClipBoard(Node: TTreeNode): Boolean; dynamic;
|
|
|
function CanPasteFromClipBoard: Boolean; dynamic;
|
|
|
- function PasteFromClipBoard(TargetPath: string = ''): Boolean; dynamic;
|
|
|
procedure PerformDragDropFileOperation(Node: TTreeNode; Effect: Integer); override;
|
|
|
|
|
|
{Drive handling:}
|
|
|
@@ -2935,7 +2936,7 @@ begin
|
|
|
if Verb = shcCopy then LastClipBoardOperation := cboCopy
|
|
|
else
|
|
|
if Verb = shcPaste then
|
|
|
- PasteFromClipBoard(NodePathName(Node));
|
|
|
+ PasteFromClipBoard(Node);
|
|
|
|
|
|
DropTarget := nil;
|
|
|
|
|
|
@@ -3258,32 +3259,27 @@ begin
|
|
|
end;
|
|
|
end; {CanPasteFromClipBoard}
|
|
|
|
|
|
-function TDriveView.PasteFromClipBoard(TargetPath: String = ''): Boolean;
|
|
|
+procedure TDriveView.PasteFromClipBoard(Node: TTreeNode);
|
|
|
begin
|
|
|
ClearDragFileList(FDragDropFilesEx.FileList);
|
|
|
- Result := False;
|
|
|
- if CanPasteFromClipBoard and {MP}FDragDropFilesEx.GetFromClipBoard{/MP}
|
|
|
- then
|
|
|
+ if CanPasteFromClipBoard and FDragDropFilesEx.GetFromClipBoard then
|
|
|
begin
|
|
|
- if TargetPath = '' then
|
|
|
- TargetPath := NodePathName(Selected);
|
|
|
case LastClipBoardOperation of
|
|
|
cboCopy,
|
|
|
cboNone:
|
|
|
begin
|
|
|
- PerformDragDropFileOperation(Selected, DROPEFFECT_COPY);
|
|
|
+ PerformDragDropFileOperation(Node, DROPEFFECT_COPY);
|
|
|
if Assigned(FOnDDExecuted) then
|
|
|
FOnDDExecuted(Self, DROPEFFECT_COPY);
|
|
|
end;
|
|
|
cboCut:
|
|
|
begin
|
|
|
- PerformDragDropFileOperation(Selected, DROPEFFECT_MOVE);
|
|
|
+ PerformDragDropFileOperation(Node, DROPEFFECT_MOVE);
|
|
|
if Assigned(FOnDDExecuted) then
|
|
|
FOnDDExecuted(Self, DROPEFFECT_MOVE);
|
|
|
EmptyClipBoard;
|
|
|
end;
|
|
|
end;
|
|
|
- Result := True;
|
|
|
end;
|
|
|
end; {PasteFromClipBoard}
|
|
|
|