mirror of https://gitlab.com/basile.b/dexed.git
libman, replace usage of branches-bloated-findCaption with the simpler version
This commit is contained in:
parent
1524c43f7d
commit
40369f219a
|
@ -415,7 +415,7 @@ var
|
||||||
begin
|
begin
|
||||||
if TDubPackageQueryForm.showAndWait(nme, ver) <> mrOk then
|
if TDubPackageQueryForm.showAndWait(nme, ver) <> mrOk then
|
||||||
exit;
|
exit;
|
||||||
if List.Items.FindCaption(0, nme, false, false, false).isNotNil then
|
if List.Items.findCaption(nme, row) then
|
||||||
begin
|
begin
|
||||||
if dlgYesNo(format('a library item with the alias "%s" already exists, do you wish to update it ?',
|
if dlgYesNo(format('a library item with the alias "%s" already exists, do you wish to update it ?',
|
||||||
[nme])) <> mrYes then exit
|
[nme])) <> mrYes then exit
|
||||||
|
@ -522,9 +522,7 @@ begin
|
||||||
and (TJSONObject(prj.json).Find('targetType').AsString = 'sourceLibrary')
|
and (TJSONObject(prj.json).Find('targetType').AsString = 'sourceLibrary')
|
||||||
then
|
then
|
||||||
begin
|
begin
|
||||||
if ovw then
|
if ovw and not List.items.findCaption(nme, row) then
|
||||||
row := List.FindCaption(0, nme, true, true, true);
|
|
||||||
if row.isNil then
|
|
||||||
row := List.Items.Add;
|
row := List.Items.Add;
|
||||||
if row.Data.isNil then
|
if row.Data.isNil then
|
||||||
row.Data := LibMan.libraries.Add;
|
row.Data := LibMan.libraries.Add;
|
||||||
|
@ -557,9 +555,7 @@ begin
|
||||||
prj.loadFromFile(dfn);
|
prj.loadFromFile(dfn);
|
||||||
if prj.filename.isNotEmpty and (prj.binaryKind = staticlib) then
|
if prj.filename.isNotEmpty and (prj.binaryKind = staticlib) then
|
||||||
begin
|
begin
|
||||||
if ovw then
|
if ovw and not List.items.findCaption(nme, row) then
|
||||||
row := List.FindCaption(0, nme, true, true, true);
|
|
||||||
if row.isNil then
|
|
||||||
row := List.Items.Add;
|
row := List.Items.Add;
|
||||||
if row.Data.isNil then
|
if row.Data.isNil then
|
||||||
row.Data := LibMan.libraries.Add;
|
row.Data := LibMan.libraries.Add;
|
||||||
|
@ -663,7 +659,7 @@ begin
|
||||||
//
|
//
|
||||||
fname := fProj.filename;
|
fname := fProj.filename;
|
||||||
lalias := ExtractFileNameOnly(fname);
|
lalias := ExtractFileNameOnly(fname);
|
||||||
if List.Items.FindCaption(0, lalias, false, false, false) <> nil then
|
if List.Items.findCaption(lalias, row) then
|
||||||
begin
|
begin
|
||||||
dlgOkInfo(format('a library item with the alias "%s" already exists, delete it before trying again.',
|
dlgOkInfo(format('a library item with the alias "%s" already exists, delete it before trying again.',
|
||||||
[lalias]));
|
[lalias]));
|
||||||
|
|
Loading…
Reference in New Issue