mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 07:39:26 +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 SetSelection(const ASelection: TPersistentSelectionList);
|
||||
procedure Unselect(const APersistent: TPersistent);
|
||||
function IsSelected(const APersistent: TPersistent): boolean;
|
||||
procedure SelectOnlyThis(const APersistent: TPersistent);
|
||||
// persistent objects
|
||||
function GetObject(const Name: ShortString): TPersistent;
|
||||
@ -5407,6 +5408,20 @@ begin
|
||||
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);
|
||||
var
|
||||
NewSelection: TPersistentSelectionList;
|
||||
|
Loading…
Reference in New Issue
Block a user