mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:49:14 +02:00
IDE, safer way to delete persistent fields in fieldseditor, the previous one caused some kind of feeback on windows and always leave one field in list if one wanted to delete all fields
git-svn-id: trunk@28043 -
This commit is contained in:
parent
dacd49687f
commit
86dbfa4186
@ -199,15 +199,9 @@ var i: integer;
|
||||
begin
|
||||
PreActive := LinkDataSet.Active;
|
||||
LinkDataSet.Active := False;
|
||||
if FieldsListBox.SelCount = 0 then exit;
|
||||
for i := FieldsListBox.Items.Count - 1 downto 0 do
|
||||
if FieldsListBox.Selected[i] then begin
|
||||
fld := TField(FieldsListBox.Items.Objects[i]);
|
||||
FieldsListBox.Items.Delete(i);
|
||||
FDesigner.PropertyEditorHook.PersistentDeleting(fld);
|
||||
fld.Free;
|
||||
end;
|
||||
FDesigner.Modified;
|
||||
if FieldsListBox.SelCount = 0 then
|
||||
exit;
|
||||
FDesigner.DeleteSelection;
|
||||
SelectionChanged;
|
||||
if PreActive then
|
||||
LinkDataSet.Active := True;
|
||||
|
Loading…
Reference in New Issue
Block a user