mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:39:15 +02:00
IDEIntf: added TPropertyEditorHook.IsSelected
git-svn-id: trunk@37143 -
This commit is contained in:
parent
70fca72696
commit
6e86b03868
@ -1238,6 +1238,7 @@ type
|
|||||||
procedure GetSelection(const ASelection: TPersistentSelectionList);
|
procedure GetSelection(const ASelection: TPersistentSelectionList);
|
||||||
procedure SetSelection(const ASelection: TPersistentSelectionList);
|
procedure SetSelection(const ASelection: TPersistentSelectionList);
|
||||||
procedure Unselect(const APersistent: TPersistent);
|
procedure Unselect(const APersistent: TPersistent);
|
||||||
|
function IsSelected(const APersistent: TPersistent): boolean;
|
||||||
procedure SelectOnlyThis(const APersistent: TPersistent);
|
procedure SelectOnlyThis(const APersistent: TPersistent);
|
||||||
// persistent objects
|
// persistent objects
|
||||||
function GetObject(const Name: ShortString): TPersistent;
|
function GetObject(const Name: ShortString): TPersistent;
|
||||||
@ -5407,6 +5408,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPropertyEditorHook.IsSelected(const APersistent: TPersistent
|
||||||
|
): boolean;
|
||||||
|
var
|
||||||
|
Selection: TPersistentSelectionList;
|
||||||
|
begin
|
||||||
|
Selection := TPersistentSelectionList.Create;
|
||||||
|
try
|
||||||
|
GetSelection(Selection);
|
||||||
|
Result:=Selection.IndexOf(APersistent)>=0;
|
||||||
|
finally
|
||||||
|
Selection.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TPropertyEditorHook.SelectOnlyThis(const APersistent: TPersistent);
|
procedure TPropertyEditorHook.SelectOnlyThis(const APersistent: TPersistent);
|
||||||
var
|
var
|
||||||
NewSelection: TPersistentSelectionList;
|
NewSelection: TPersistentSelectionList;
|
||||||
|
Loading…
Reference in New Issue
Block a user