mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:36:14 +02:00
IDE: Fixed components with published properties of type "interface" does not work. Issue #32919. Patch by Andi Friess
git-svn-id: trunk@57332 -
This commit is contained in:
parent
e34bbc5c6f
commit
c582885e5c
@ -2204,7 +2204,10 @@ begin
|
|||||||
if (not (paSubProperties in Row.Editor.GetAttributes)) then exit;
|
if (not (paSubProperties in Row.Editor.GetAttributes)) then exit;
|
||||||
// check if circling
|
// check if circling
|
||||||
if (Row.Editor is TPersistentPropertyEditor) then begin
|
if (Row.Editor is TPersistentPropertyEditor) then begin
|
||||||
AnObject:=TPersistent(Row.Editor.GetObjectValue);
|
if (Row.Editor is TInterfacePropertyEditor) then
|
||||||
|
AnObject:=TPersistent(Row.Editor.GetIntfValue)
|
||||||
|
else
|
||||||
|
AnObject:=TPersistent(Row.Editor.GetObjectValue);
|
||||||
if FSelection.IndexOf(AnObject)>=0 then exit;
|
if FSelection.IndexOf(AnObject)>=0 then exit;
|
||||||
ParentRow:=Row.Parent;
|
ParentRow:=Row.Parent;
|
||||||
while ParentRow<>nil do begin
|
while ParentRow<>nil do begin
|
||||||
|
@ -747,6 +747,7 @@ type
|
|||||||
function GetSelections: TPersistentSelectionList; override;
|
function GetSelections: TPersistentSelectionList; override;
|
||||||
public
|
public
|
||||||
function AllEqual: Boolean; override;
|
function AllEqual: Boolean; override;
|
||||||
|
procedure Edit; override;
|
||||||
function GetAttributes: TPropertyAttributes; override;
|
function GetAttributes: TPropertyAttributes; override;
|
||||||
procedure GetValues(Proc: TGetStrProc); override;
|
procedure GetValues(Proc: TGetStrProc); override;
|
||||||
procedure SetValue(const NewValue: string); override;
|
procedure SetValue(const NewValue: string); override;
|
||||||
@ -5089,9 +5090,28 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TInterfacePropertyEditor.Edit;
|
||||||
|
var
|
||||||
|
Temp: TPersistent;
|
||||||
|
Designer: TIDesigner;
|
||||||
|
AComponent: TComponent;
|
||||||
|
begin
|
||||||
|
Temp := GetComponentReference;
|
||||||
|
if Temp is TComponent then begin
|
||||||
|
AComponent:=TComponent(Temp);
|
||||||
|
Designer:=FindRootDesigner(AComponent);
|
||||||
|
if (Designer<>nil)
|
||||||
|
and (Designer.GetShiftState * [ssCtrl, ssLeft] = [ssCtrl, ssLeft]) then
|
||||||
|
Designer.SelectOnlyThisComponent(AComponent)
|
||||||
|
else
|
||||||
|
inherited Edit;
|
||||||
|
end else
|
||||||
|
inherited Edit;
|
||||||
|
end;
|
||||||
|
|
||||||
function TInterfacePropertyEditor.GetAttributes: TPropertyAttributes;
|
function TInterfacePropertyEditor.GetAttributes: TPropertyAttributes;
|
||||||
begin
|
begin
|
||||||
Result := [paMultiSelect];
|
Result := [paMultiSelect];
|
||||||
if Assigned(GetPropInfo^.SetProc) then
|
if Assigned(GetPropInfo^.SetProc) then
|
||||||
Result := Result + [paValueList, paSortList, paRevertable, paVolatileSubProperties]
|
Result := Result + [paValueList, paSortList, paRevertable, paVolatileSubProperties]
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user