mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:39:30 +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;
|
||||
// check if circling
|
||||
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;
|
||||
ParentRow:=Row.Parent;
|
||||
while ParentRow<>nil do begin
|
||||
|
@ -747,6 +747,7 @@ type
|
||||
function GetSelections: TPersistentSelectionList; override;
|
||||
public
|
||||
function AllEqual: Boolean; override;
|
||||
procedure Edit; override;
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
procedure SetValue(const NewValue: string); override;
|
||||
@ -5089,9 +5090,28 @@ begin
|
||||
Result := True;
|
||||
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;
|
||||
begin
|
||||
Result := [paMultiSelect];
|
||||
Result := [paMultiSelect];
|
||||
if Assigned(GetPropInfo^.SetProc) then
|
||||
Result := Result + [paValueList, paSortList, paRevertable, paVolatileSubProperties]
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user