mirror of https://gitlab.com/basile.b/dexed.git
alias can be automatically set
This commit is contained in:
parent
eb7f061480
commit
74826a6fbb
|
@ -43,6 +43,9 @@ implementation
|
|||
uses
|
||||
ce_libman;
|
||||
|
||||
const
|
||||
notav: string = '< n/a >';
|
||||
|
||||
procedure TCELibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem;
|
||||
var AValue: string);
|
||||
begin
|
||||
|
@ -52,8 +55,6 @@ end;
|
|||
procedure TCELibManEditorWidget.btnAddLibClick(Sender: TObject);
|
||||
var
|
||||
itm: TListItem;
|
||||
const
|
||||
notav: string = '< n/a >';
|
||||
begin
|
||||
itm := List.Items.Add;
|
||||
itm.Caption := notav;
|
||||
|
@ -98,8 +99,11 @@ begin
|
|||
begin
|
||||
if not fileExists(filename) then
|
||||
List.Selected.SubItems[0] := extractFilePath(filename)
|
||||
else
|
||||
else begin
|
||||
List.Selected.SubItems[0] := filename;
|
||||
if (List.Selected.Caption = '') or (List.Selected.Caption = notav) then
|
||||
List.Selected.Caption := ChangeFileExt(extractFileName(filename), '');
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
Free;
|
||||
|
|
Loading…
Reference in New Issue