mirror of https://gitlab.com/basile.b/dexed.git
nothing
This commit is contained in:
parent
09275e499d
commit
9cd9eefc91
|
@ -64,7 +64,7 @@ var
|
||||||
begin
|
begin
|
||||||
clearInspector;
|
clearInspector;
|
||||||
lstTools.Clear;
|
lstTools.Clear;
|
||||||
//
|
|
||||||
for i := 0 to CustomTools.tools.Count-1 do
|
for i := 0 to CustomTools.tools.Count-1 do
|
||||||
lstTools.AddItem(CustomTools[i].toolAlias, nil);
|
lstTools.AddItem(CustomTools[i].toolAlias, nil);
|
||||||
if lstTools.Count > 0 then
|
if lstTools.Count > 0 then
|
||||||
|
@ -93,6 +93,7 @@ procedure TCEToolsEditorWidget.propsEdModified(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if propsEd.ItemIndex = -1 then
|
if propsEd.ItemIndex = -1 then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if (propsEd.Rows[propsEd.ItemIndex].Name = 'toolAlias')
|
if (propsEd.Rows[propsEd.ItemIndex].Name = 'toolAlias')
|
||||||
or (propsEd.Rows[propsEd.ItemIndex].Name = 'shortcut') then
|
or (propsEd.Rows[propsEd.ItemIndex].Name = 'shortcut') then
|
||||||
updateToolList;
|
updateToolList;
|
||||||
|
@ -110,6 +111,7 @@ var
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex = -1 then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
itm := CustomTools.addTool;
|
itm := CustomTools.addTool;
|
||||||
itm.Assign(CustomTools[lstTools.ItemIndex]);
|
itm.Assign(CustomTools[lstTools.ItemIndex]);
|
||||||
itm.toolAlias := itm.toolAlias + ' (copy)';
|
itm.toolAlias := itm.toolAlias + ' (copy)';
|
||||||
|
@ -120,6 +122,7 @@ procedure TCEToolsEditorWidget.btnRemToolClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex = -1 then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
clearInspector;
|
clearInspector;
|
||||||
CustomTools.tools.Delete(lstTools.ItemIndex);
|
CustomTools.tools.Delete(lstTools.ItemIndex);
|
||||||
rebuildToolList;
|
rebuildToolList;
|
||||||
|
@ -127,9 +130,9 @@ end;
|
||||||
|
|
||||||
procedure TCEToolsEditorWidget.btnMoveUpClick(Sender: TObject);
|
procedure TCEToolsEditorWidget.btnMoveUpClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then exit;
|
if lstTools.ItemIndex < 1 then
|
||||||
if lstTools.ItemIndex = 0 then exit;
|
exit;
|
||||||
//
|
|
||||||
CustomTools.tools.Exchange(lstTools.ItemIndex, lstTools.ItemIndex - 1);
|
CustomTools.tools.Exchange(lstTools.ItemIndex, lstTools.ItemIndex - 1);
|
||||||
lstTools.ItemIndex := lstTools.ItemIndex - 1;
|
lstTools.ItemIndex := lstTools.ItemIndex - 1;
|
||||||
updateToolList;
|
updateToolList;
|
||||||
|
@ -137,9 +140,9 @@ end;
|
||||||
|
|
||||||
procedure TCEToolsEditorWidget.btnMoveDownClick(Sender: TObject);
|
procedure TCEToolsEditorWidget.btnMoveDownClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then exit;
|
if (lstTools.ItemIndex = -1) or (lstTools.ItemIndex = lstTools.Items.Count-1) then
|
||||||
if lstTools.ItemIndex = lstTools.Items.Count-1 then exit;
|
exit;
|
||||||
//
|
|
||||||
CustomTools.tools.Exchange(lstTools.ItemIndex, lstTools.ItemIndex + 1);
|
CustomTools.tools.Exchange(lstTools.ItemIndex, lstTools.ItemIndex + 1);
|
||||||
lstTools.ItemIndex := lstTools.ItemIndex + 1;
|
lstTools.ItemIndex := lstTools.ItemIndex + 1;
|
||||||
updateToolList;
|
updateToolList;
|
||||||
|
@ -149,6 +152,7 @@ procedure TCEToolsEditorWidget.executeSelectedTool;
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex = -1 then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
CustomTools.executeTool(lstTools.ItemIndex);
|
CustomTools.executeTool(lstTools.ItemIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue