mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 08:41:44 +02:00
LCL: Fix FlowPanel component editor to correctly enable/disable buttons when opened.
git-svn-id: trunk@59116 -
This commit is contained in:
parent
d29f4d692f
commit
94c4596ba4
@ -46,7 +46,6 @@ type
|
||||
procedure Modified;
|
||||
protected
|
||||
procedure UpdateCaption;
|
||||
procedure UpdateButtons;
|
||||
procedure PersistentAdded({%H-}APersistent: TPersistent; {%H-}Select: boolean);
|
||||
procedure ComponentRenamed(AComponent: TComponent);
|
||||
procedure PersistentDeleting(APersistent: TPersistent);
|
||||
@ -54,6 +53,7 @@ type
|
||||
public
|
||||
procedure SetCollection(NewCollection: TCollection;
|
||||
NewOwnerPersistent: TPersistent; const NewPropName: String);
|
||||
procedure UpdateButtons;
|
||||
public
|
||||
property Collection: TCollection read FCollection;
|
||||
property OwnerComponent: TPersistent read FOwnerComponent;
|
||||
|
@ -4499,9 +4499,13 @@ begin
|
||||
CollectionForm.SetCollection(ACollection, OwnerPersistent, PropName);
|
||||
CollectionForm.AddButton.Show;
|
||||
CollectionForm.Deletebutton.Show;
|
||||
CollectionForm.AddButton.Left := 0;
|
||||
CollectionForm.DeleteButton.Left := 1;
|
||||
CollectionForm.DividerToolButton.Show;
|
||||
CollectionForm.DividerToolButton.Left := CollectionForm.DeleteButton.Left + 1;
|
||||
SetPopupModeParentForPropertyEditor(CollectionForm);
|
||||
CollectionForm.EnsureVisible;
|
||||
CollectionForm.UpdateButtons;
|
||||
Result:=CollectionForm;
|
||||
end;
|
||||
|
||||
@ -4535,10 +4539,9 @@ begin
|
||||
CollectionForm.AddButton.Hide;
|
||||
CollectionForm.Deletebutton.Hide;
|
||||
CollectionForm.DividerToolButton.Hide;
|
||||
CollectionForm.MoveUpButton.Enabled := false;
|
||||
CollectionForm.MoveDownButton.Enabled := false;
|
||||
SetPopupModeParentForPropertyEditor(CollectionForm);
|
||||
CollectionForm.EnsureVisible;
|
||||
CollectionForm.UpdateButtons;
|
||||
Result := CollectionForm;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user