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