UPD: Dialog position

(cherry picked from commit d002cdc373)
This commit is contained in:
Alexander Koblov 2026-05-14 18:29:57 +03:00
commit 5b42ecd68d
3 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,7 @@ object frmDescrEdit: TfrmDescrEdit
Constraints.MinWidth = 400
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
Position = poOwnerFormCenter
SessionProperties = 'Height;WindowState;Width'
LCLVersion = '2.0.4.0'
object lblEditCommentFor: TLabel

View file

@ -59,7 +59,7 @@ type
procedure cm_SaveDescription(const {%H-}Params: array of string);
end;
function ShowDescrEditDlg(const sFileName: String; FileView: TFileView): Boolean;
function ShowDescrEditDlg(TheOwner: TComponent; const sFileName: String; FileView: TFileView): Boolean;
implementation
@ -72,7 +72,7 @@ uses
const
HotkeysCategory = 'Edit Comment Dialog';
function ShowDescrEditDlg(const sFileName: String; FileView: TFileView): Boolean;
function ShowDescrEditDlg(TheOwner: TComponent; const sFileName: String; FileView: TFileView): Boolean;
const
nbsp = #194#160;
var
@ -80,7 +80,7 @@ var
begin
Result:= False;
FileSystem:= FileView.FileSource.IsClass(TFileSystemFileSource);
with TfrmDescrEdit.Create(Application) do
with TfrmDescrEdit.Create(TheOwner) do
try
if not FileSystem then
FDescr:= TDescription.Create(False)

View file

@ -4342,7 +4342,7 @@ begin
if Assigned(aFile) then
try
if aFile.IsNameValid then
ShowDescrEditDlg(aFile.FullPath, frmMain.ActiveFrame)
ShowDescrEditDlg(frmMain, aFile.FullPath, frmMain.ActiveFrame)
else
msgWarning(rsMsgNoFilesSelected);
finally
@ -4357,7 +4357,7 @@ begin
if aFile.IsNameValid then
begin
if FileSource.GetLocalName(aFile) then
ShowDescrEditDlg(aFile.FullPath, frmMain.ActiveFrame)
ShowDescrEditDlg(frmMain, aFile.FullPath, frmMain.ActiveFrame)
else
msgWarning(rsMsgErrNotSupported);
end