mirror of https://gitlab.com/basile.b/dexed.git
prevent useless call tp string list item getter
This commit is contained in:
parent
b4440e03c0
commit
506b64591b
|
@ -1264,7 +1264,6 @@ begin
|
||||||
fLifeTimeStatusProvider := TLifetimeProvider.create;
|
fLifeTimeStatusProvider := TLifetimeProvider.create;
|
||||||
fLifeTimeStatusProvider.lifetimeStatus:=lfsLoading;
|
fLifeTimeStatusProvider.lifetimeStatus:=lfsLoading;
|
||||||
|
|
||||||
|
|
||||||
inherited create(aOwner);
|
inherited create(aOwner);
|
||||||
|
|
||||||
// provide defaults, necessary because not handled by docking.xml
|
// provide defaults, necessary because not handled by docking.xml
|
||||||
|
@ -1304,6 +1303,7 @@ begin
|
||||||
mainMenu.Items.Add(mnuItemHelp);
|
mainMenu.Items.Add(mnuItemHelp);
|
||||||
|
|
||||||
fProcInputHandler := getprocInputHandler;
|
fProcInputHandler := getprocInputHandler;
|
||||||
|
|
||||||
fInitialized := true;
|
fInitialized := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1417,12 +1417,12 @@ var
|
||||||
z: array[TIconScaledSize] of integer = (16, 24, 32);
|
z: array[TIconScaledSize] of integer = (16, 24, 32);
|
||||||
i: integer;
|
i: integer;
|
||||||
|
|
||||||
function loadIcon(value: string): integer;
|
function loadIcon(value: string): integer;
|
||||||
const
|
const
|
||||||
s: array[TIconScaledSize] of string = ('', '24', '32');
|
s: array[TIconScaledSize] of string = ('', '24', '32');
|
||||||
begin
|
begin
|
||||||
result := fImages.AddResourceName(HINSTANCE, value + s[c]);
|
result := fImages.AddResourceName(HINSTANCE, value + s[c]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
c := GetIconScaledSize;
|
c := GetIconScaledSize;
|
||||||
|
@ -2336,6 +2336,7 @@ var
|
||||||
fname: string;
|
fname: string;
|
||||||
clickTrg: TNotifyEvent;
|
clickTrg: TNotifyEvent;
|
||||||
i: integer;
|
i: integer;
|
||||||
|
s: string;
|
||||||
begin
|
begin
|
||||||
srcLst := TMRUFileList(Sender);
|
srcLst := TMRUFileList(Sender);
|
||||||
if srcLst.isNil then
|
if srcLst.isNil then
|
||||||
|
@ -2356,17 +2357,16 @@ begin
|
||||||
|
|
||||||
trgMnu.Clear;
|
trgMnu.Clear;
|
||||||
|
|
||||||
|
|
||||||
for i := 0 to srcLst.Count-1 do
|
for i := 0 to srcLst.Count-1 do
|
||||||
begin
|
begin
|
||||||
|
s := srcLst.Strings[i];
|
||||||
if srcLst = fFileMru then
|
if srcLst = fFileMru then
|
||||||
fname := srcLst.Strings[i].extractFileName
|
fname := s.extractFileName
|
||||||
else
|
else
|
||||||
fname := srcLst.Strings[i].extractFileDir.extractFileName;
|
fname := s.extractFileDir.extractFileName;
|
||||||
|
|
||||||
itm := TMenuItem.Create(trgMnu);
|
itm := TMenuItem.Create(trgMnu);
|
||||||
itm.Hint := srcLst.Strings[i];
|
itm.Hint := s;
|
||||||
itm.Caption := fname + ' - (' + itm.Hint + ')';
|
itm.Caption := fname + ' - (' + itm.Hint + ')';
|
||||||
itm.OnClick := clickTrg;
|
itm.OnClick := clickTrg;
|
||||||
trgMnu.Add(itm);
|
trgMnu.Add(itm);
|
||||||
|
@ -2392,7 +2392,6 @@ begin
|
||||||
if srcLst.isNotNil then
|
if srcLst.isNotNil then
|
||||||
srcLst.Clear;
|
srcLst.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION IMultiDocMonitor ----------------------------------------------------}
|
{$REGION IMultiDocMonitor ----------------------------------------------------}
|
||||||
|
|
Loading…
Reference in New Issue