mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 02:20:30 +01:00
ideintf: simpifications
git-svn-id: trunk@59475 -
This commit is contained in:
parent
df79b8ffbb
commit
da1be191da
@ -5357,22 +5357,22 @@ end;
|
||||
procedure TObjectInspectorDlg.ComponentRestrictedPaint(Sender: TObject);
|
||||
var
|
||||
I, J: Integer;
|
||||
WidgetSetRestrictions: TWidgetSetRestrictionsArray;
|
||||
WSRestrictions: TWidgetSetRestrictionsArray;
|
||||
RestrProp: TOIRestrictedProperty;
|
||||
begin
|
||||
if (RestrictedProps = nil) or (Selection = nil) then exit;
|
||||
|
||||
FillChar(WidgetSetRestrictions{%H-}, SizeOf(WidgetSetRestrictions), 0);
|
||||
FillChar(WSRestrictions{%H-}, SizeOf(WSRestrictions), 0);
|
||||
for I := 0 to RestrictedProps.Count - 1 do
|
||||
begin
|
||||
if not (RestrictedProps.Items[I] is TOIRestrictedProperty) then continue;
|
||||
RestrProp:=TOIRestrictedProperty(RestrictedProps.Items[I]);
|
||||
for J := 0 to Selection.Count - 1 do
|
||||
with RestrProp do
|
||||
CheckRestrictions(Selection[J].ClassType, WidgetSetRestrictions);
|
||||
CheckRestrictions(Selection[J].ClassType, WSRestrictions);
|
||||
end;
|
||||
|
||||
RestrictedPaint(ComponentRestrictedBox, WidgetSetRestrictions);
|
||||
RestrictedPaint(ComponentRestrictedBox, WSRestrictions);
|
||||
end;
|
||||
|
||||
procedure TObjectInspectorDlg.TopSplitterMoved(Sender: TObject);
|
||||
|
||||
@ -233,6 +233,7 @@ var
|
||||
AClass: TPersistentClass;
|
||||
AProperty: String;
|
||||
P: Integer;
|
||||
Platform: TLCLPlatform;
|
||||
begin
|
||||
if RestrictedName = '' then Exit;
|
||||
|
||||
@ -247,16 +248,18 @@ begin
|
||||
AClass := FClassList.Find(Copy(RestrictedName, 0, P - 1));
|
||||
AProperty := Copy(RestrictedName, P + 1, MaxInt);
|
||||
end;
|
||||
|
||||
|
||||
Platform:=DirNameToLCLPlatform(WidgetSetName);
|
||||
if AClass = nil then
|
||||
begin
|
||||
// add as generic widgetset issue
|
||||
FRestrictedProperties.WidgetSetRestrictions[DirNameToLCLPlatform(WidgetSetName)] := FRestrictedProperties.WidgetSetRestrictions[DirNameToLCLPlatform(WidgetSetName)] + 1;
|
||||
//debugln('TRestrictedManager.AddRestrictedProperty ',RestrictedName,' ',WidgetSetName);
|
||||
inc(FRestrictedProperties.WidgetSetRestrictions[Platform]);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
Issue := TOIRestrictedProperty.Create(AClass, AProperty, True);
|
||||
Issue.WidgetSets := [DirNameToLCLPlatform(WidgetSetName)];
|
||||
Issue.WidgetSets := [Platform];
|
||||
FRestrictedProperties.Add(Issue);
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user