mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:49:14 +02:00
Refresh AnchorEditor after a control is changed in DockedFormEditor anchor designer
git-svn-id: trunk@64531 -
This commit is contained in:
parent
46643fdda0
commit
1f95674923
@ -203,7 +203,7 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
FState := [];
|
||||
GlobalDesignHook.Modified(FSelectedControl.RootControl);
|
||||
GlobalDesignHook.Modified(Self, 'Anchors');
|
||||
GlobalDesignHook.SelectOnlyThis(TAnchorControl(Sender).RootControl);
|
||||
end;
|
||||
|
||||
@ -329,7 +329,7 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
FState := [];
|
||||
GlobalDesignHook.Modified(FSelectedControl.RootControl);
|
||||
GlobalDesignHook.Modified(Self, 'Anchors');
|
||||
end;
|
||||
|
||||
procedure TAnchorDesigner.BringToFront(AControl: TAnchorControl);
|
||||
@ -574,7 +574,7 @@ begin
|
||||
|
||||
FSelectedControl.AssignToRoot_Anchors;
|
||||
FState := [];
|
||||
GlobalDesignHook.Modified(FSelectedControl.RootControl);
|
||||
GlobalDesignHook.Modified(Self, 'Anchors');
|
||||
GlobalDesignHook.SelectOnlyThis(FSelectedControl.RootControl);
|
||||
end;
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
- ObjectInspector eats focus of AnchorDesigner (bug or feature?)
|
||||
- Qt5 shows own menu in form, this isn't shown in anchor editor
|
||||
TODO:
|
||||
- Lazarus AnchorEditor isn't refreshed after control is changed in DockedAnchorDesigner
|
||||
- Undo
|
||||
|
||||
}
|
||||
|
@ -181,6 +181,7 @@ type
|
||||
FUpdating: Boolean;
|
||||
FNeedUpdate: boolean;
|
||||
FSideControls: array[TAnchorKind] of TAnchorDesignerSideControls;
|
||||
procedure OnModifiedWithName(Sender: TObject; PropName: ShortString);
|
||||
procedure Refresh;
|
||||
procedure OnRefreshPropertyValues;
|
||||
procedure OnSetSelection(const ASelection: TPersistentSelectionList);
|
||||
@ -404,6 +405,7 @@ begin
|
||||
LoadGlyphs;
|
||||
CreateSideControls;
|
||||
|
||||
GlobalDesignHook.AddHandlerModifiedWithName(@OnModifiedWithName);
|
||||
GlobalDesignHook.AddHandlerRefreshPropertyValues(@OnRefreshPropertyValues);
|
||||
GlobalDesignHook.AddHandlerSetSelection(@OnSetSelection);
|
||||
end;
|
||||
@ -1067,6 +1069,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAnchorDesigner.OnModifiedWithName(Sender: TObject; PropName: ShortString);
|
||||
begin
|
||||
if Sender = Self then Exit;
|
||||
if PropName = 'Anchors' then
|
||||
Refresh;
|
||||
end;
|
||||
|
||||
procedure TAnchorDesigner.OnRefreshPropertyValues;
|
||||
begin
|
||||
Refresh;
|
||||
|
Loading…
Reference in New Issue
Block a user