LCL: qt, gtk1, win32: dropfiles for sub forms

git-svn-id: trunk@45561 -
This commit is contained in:
mattias 2014-06-16 22:32:25 +00:00
parent 0768cb0727
commit bbf6c0d283
3 changed files with 7 additions and 6 deletions

View File

@ -2830,8 +2830,8 @@ begin
TCustomForm(LCLObject).IntfDropFiles(Files) TCustomForm(LCLObject).IntfDropFiles(Files)
else else
begin begin
ParentForm := LCLObject.IntfGetDropFilesTarget; ParentForm := TCustomForm(LCLObject.IntfGetDropFilesTarget);
if Assigned(ParentForm) then if ParentForm is TCustomForm then
ParentForm.IntfDropFiles(Files); ParentForm.IntfDropFiles(Files);
end; end;

View File

@ -918,7 +918,7 @@ var
Drop: HDROP; Drop: HDROP;
L: LongWord; L: LongWord;
I, C: Integer; I, C: Integer;
aForm: TCustomForm; DropForm: TWinControl;
{$IFDEF WindowsUnicodeSupport} {$IFDEF WindowsUnicodeSupport}
AnsiBuffer: string; AnsiBuffer: string;
WideBuffer: WideString; WideBuffer: WideString;
@ -958,9 +958,9 @@ var
if Length(Files) > 0 then if Length(Files) > 0 then
begin begin
aForm := lWinControl.IntfGetDropFilesTarget; DropForm := lWinControl.IntfGetDropFilesTarget;
if aForm<>nil then if DropForm is TCustomForm then
aForm.IntfDropFiles(Files); TCustomForm(DropForm).IntfDropFiles(Files);
if Application <> nil then if Application <> nil then
Application.IntfDropFiles(Files); Application.IntfDropFiles(Files);
end; end;

View File

@ -1360,6 +1360,7 @@ procedure TPackageEditorForm.FormDropFiles(Sender: TObject;
const FileNames: array of String); const FileNames: array of String);
begin begin
debugln(['TPackageEditorForm.FormDropFiles ',length(FileNames)]); debugln(['TPackageEditorForm.FormDropFiles ',length(FileNames)]);
IntfGetDropFilesTarget;
end; end;
procedure TPackageEditorForm.RevertClick(Sender: TObject); procedure TPackageEditorForm.RevertClick(Sender: TObject);