mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Files not unselected after copy via drag&drop, bug [0000403].
This commit is contained in:
parent
76a64477bb
commit
c4961304d9
2 changed files with 27 additions and 21 deletions
|
|
@ -1277,10 +1277,13 @@ begin
|
|||
ddoMove:
|
||||
if GetDragDropType = ddtInternal then
|
||||
begin
|
||||
Self.MoveFiles(SourcePanel.FileSource,
|
||||
TargetPanel.FileSource,
|
||||
Files, TargetPath,
|
||||
gShowDialogOnDragDrop);
|
||||
if Self.MoveFiles(SourcePanel.FileSource,
|
||||
TargetPanel.FileSource,
|
||||
Files, TargetPath,
|
||||
gShowDialogOnDragDrop) then
|
||||
begin
|
||||
SourcePanel.UnselectAllFiles;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
@ -1293,10 +1296,13 @@ begin
|
|||
ddoCopy:
|
||||
if GetDragDropType = ddtInternal then
|
||||
begin
|
||||
Self.CopyFiles(SourcePanel.FileSource,
|
||||
TargetPanel.FileSource,
|
||||
Files, TargetPath,
|
||||
gShowDialogOnDragDrop);
|
||||
if Self.CopyFiles(SourcePanel.FileSource,
|
||||
TargetPanel.FileSource,
|
||||
Files, TargetPath,
|
||||
gShowDialogOnDragDrop) then
|
||||
begin
|
||||
SourcePanel.UnselectAllFiles;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
@ -2668,6 +2674,9 @@ begin
|
|||
try
|
||||
Result := CopyFiles(ActiveFrame.FileSource, NotActiveFrame.FileSource,
|
||||
SourceFiles, sDestPath, bShowDialog, QueueIdentifier);
|
||||
if Result then
|
||||
ActiveFrame.UnselectAllFiles;
|
||||
|
||||
finally
|
||||
if Assigned(SourceFiles) then
|
||||
FreeAndNil(SourceFiles);
|
||||
|
|
@ -2688,6 +2697,9 @@ begin
|
|||
try
|
||||
Result := MoveFiles(ActiveFrame.FileSource, NotActiveFrame.FileSource,
|
||||
SourceFiles, sDestPath, bShowDialog, QueueIdentifier);
|
||||
if Result then
|
||||
ActiveFrame.UnselectAllFiles;
|
||||
|
||||
finally
|
||||
if Assigned(SourceFiles) then
|
||||
FreeAndNil(SourceFiles);
|
||||
|
|
@ -4788,4 +4800,4 @@ initialization
|
|||
TFormCommands.RegisterCommandsForm(TfrmMain, HotkeysCategory, @rsHotkeyCategoryMain);
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1304,18 +1304,15 @@ end;
|
|||
// <queue_identifier>
|
||||
procedure TMainCommands.cm_Copy(const Params: array of string);
|
||||
var
|
||||
bConfirmation, HasQueueId, CopyResult: Boolean;
|
||||
bConfirmation, HasQueueId: Boolean;
|
||||
QueueIdentifier: TOperationsManagerQueueIdentifier;
|
||||
begin
|
||||
ReadCopyRenameParams(Params, bConfirmation, HasQueueId, QueueIdentifier);
|
||||
|
||||
if HasQueueId then
|
||||
CopyResult := frmMain.CopyFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation, QueueIdentifier)
|
||||
frmMain.CopyFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation, QueueIdentifier)
|
||||
else
|
||||
CopyResult := frmMain.CopyFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation);
|
||||
|
||||
if CopyResult then
|
||||
frmMain.ActiveFrame.UnselectAllFiles;
|
||||
frmMain.CopyFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation);
|
||||
end;
|
||||
|
||||
procedure TMainCommands.cm_CopyNoAsk(const Params: array of string);
|
||||
|
|
@ -1332,18 +1329,15 @@ end;
|
|||
// <queue_identifier>
|
||||
procedure TMainCommands.cm_Rename(const Params: array of string);
|
||||
var
|
||||
bConfirmation, HasQueueId, MoveResult: Boolean;
|
||||
bConfirmation, HasQueueId: Boolean;
|
||||
QueueIdentifier: TOperationsManagerQueueIdentifier;
|
||||
begin
|
||||
ReadCopyRenameParams(Params, bConfirmation, HasQueueId, QueueIdentifier);
|
||||
|
||||
if HasQueueId then
|
||||
MoveResult := frmMain.MoveFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation, QueueIdentifier)
|
||||
frmMain.MoveFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation, QueueIdentifier)
|
||||
else
|
||||
MoveResult := frmMain.MoveFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation);
|
||||
|
||||
if MoveResult then
|
||||
frmMain.ActiveFrame.UnselectAllFiles;
|
||||
frmMain.MoveFiles(frmMain.NotActiveFrame.CurrentPath, bConfirmation);
|
||||
end;
|
||||
|
||||
procedure TMainCommands.cm_RenameNoAsk(const Params: array of string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue