mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 06:52:35 +02:00
Opkman: Fix editing a ListBox item in a sorted list.
git-svn-id: trunk@53797 -
This commit is contained in:
parent
ccc4cf64a7
commit
0330cf85c9
@ -268,7 +268,13 @@ begin
|
||||
Index := -1;
|
||||
Value := InputBox(rsOptions_InputBox_Caption, MsgTxt, GetSelectedText(ListBox, Index));
|
||||
if (Value <> '') and (Index <> -1) then
|
||||
begin
|
||||
ListBox.Sorted := False;
|
||||
ListBox.Items[Index] := Value;
|
||||
ListBox.Sorted := True;
|
||||
Index := ListBox.Items.IndexOf(Value);
|
||||
ListBox.Selected[Index] := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -301,10 +307,8 @@ begin
|
||||
Index := -1;
|
||||
Value := GetSelectedText(ListBox, Index);
|
||||
if (Value <> '') and (Index <> -1) then
|
||||
begin
|
||||
if MessageDlgEx(Format(MsgConf, [Value]), mtConfirmation, [mbYes, mbNo], Self) = mrYes then
|
||||
ListBox.Items.Delete(Index);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOptionsFrm.bRestoreClick(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user