ide: solve Invalid Type Cast in menu editor + TFrame. Issue #29955, patch from Denis Kozlov

git-svn-id: trunk@52107 -
This commit is contained in:
ondrej 2016-04-05 21:14:41 +00:00
parent b4316ad202
commit eb754b6fff

View File

@ -86,7 +86,6 @@ type
procedure LoadFixedButtonGlyphs; procedure LoadFixedButtonGlyphs;
procedure OnDesignerSetSelection(const ASelection: TPersistentSelectionList); procedure OnDesignerSetSelection(const ASelection: TPersistentSelectionList);
procedure ProcessForPopup(aControl: TControl); procedure ProcessForPopup(aControl: TControl);
procedure ScanLookupRoot(aForm: TCustomForm);
procedure SetupPopupAssignmentsDisplay; procedure SetupPopupAssignmentsDisplay;
public public
constructor Create(aDesigner: TMenuDesignerBase); reintroduce; constructor Create(aDesigner: TMenuDesignerBase); reintroduce;
@ -438,16 +437,6 @@ begin
end; end;
end; end;
procedure TMenuDesignerForm.ScanLookupRoot(aForm: TCustomForm);
var
i: integer;
begin
if (aForm.PopupMenu = FEditedMenu) then
FPopupAssignments.Add(aForm.Name);
for i:=0 to aForm.ControlCount-1 do
ProcessForPopup(aForm.Controls[i]);
end;
function TMenuDesignerForm.GetPopupAssignmentCount: integer; function TMenuDesignerForm.GetPopupAssignmentCount: integer;
var var
lookupRoot: TPersistent; lookupRoot: TPersistent;
@ -458,7 +447,7 @@ begin
else begin else begin
FreeAndNil(FPopupAssignments); FreeAndNil(FPopupAssignments);
FPopupAssignments:=TStringList.Create; FPopupAssignments:=TStringList.Create;
ScanLookupRoot(lookupRoot as TCustomForm); ProcessForPopup(lookupRoot as TControl);
Result:=FPopupAssignments.Count; Result:=FPopupAssignments.Count;
end end
end; end;