mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 01:26:24 +02:00
IDE: clean up
git-svn-id: trunk@45621 -
This commit is contained in:
parent
e09f10816f
commit
50e6e8ecf9
32
ide/main.pp
32
ide/main.pp
@ -1782,8 +1782,11 @@ end;
|
|||||||
|
|
||||||
procedure TMainIDE.OIOnDestroy(Sender: TObject);
|
procedure TMainIDE.OIOnDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ObjectInspector1=Sender then
|
if ObjectInspector1=Sender then begin
|
||||||
ObjectInspector1:=nil;
|
ObjectInspector1:=nil;
|
||||||
|
if FormEditor1<>nil then
|
||||||
|
FormEditor1.Obj_Inspector := nil;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.OIOnAutoShow(Sender: TObject);
|
procedure TMainIDE.OIOnAutoShow(Sender: TObject);
|
||||||
@ -1815,9 +1818,9 @@ var
|
|||||||
Caret: TPoint;
|
Caret: TPoint;
|
||||||
NewTopLine: integer;
|
NewTopLine: integer;
|
||||||
begin
|
begin
|
||||||
if not BeginCodeTools then exit;
|
|
||||||
if Sender=nil then Sender:=ObjectInspector1;
|
if Sender=nil then Sender:=ObjectInspector1;
|
||||||
if Sender is TObjectInspectorDlg then begin
|
if Sender is TObjectInspectorDlg then begin
|
||||||
|
if not BeginCodeTools then exit;
|
||||||
AnInspector:=TObjectInspectorDlg(Sender);
|
AnInspector:=TObjectInspectorDlg(Sender);
|
||||||
if FindDeclarationOfOIProperty(AnInspector,nil,Code,Caret,NewTopLine) then
|
if FindDeclarationOfOIProperty(AnInspector,nil,Code,Caret,NewTopLine) then
|
||||||
DoOpenFileAndJumpToPos(Code.Filename,Caret,NewTopLine,-1,-1,[]);
|
DoOpenFileAndJumpToPos(Code.Filename,Caret,NewTopLine,-1,-1,[]);
|
||||||
@ -1842,8 +1845,8 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
AHint:='';
|
AHint:='';
|
||||||
HintWinRect:=Rect(0,0,0,0);
|
HintWinRect:=Rect(0,0,0,0);
|
||||||
if not BeginCodeTools then exit;
|
|
||||||
if ObjectInspector1=nil then exit;
|
if ObjectInspector1=nil then exit;
|
||||||
|
if not BeginCodeTools then exit;
|
||||||
if FindDeclarationOfOIProperty(ObjectInspector1,PointedRow,Code,Caret,NewTopLine)
|
if FindDeclarationOfOIProperty(ObjectInspector1,PointedRow,Code,Caret,NewTopLine)
|
||||||
then begin
|
then begin
|
||||||
if TIDEHelpManager(HelpBoss).GetHintForSourcePosition(Code.Filename,
|
if TIDEHelpManager(HelpBoss).GetHintForSourcePosition(Code.Filename,
|
||||||
@ -2215,6 +2218,17 @@ end;
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
procedure TMainIDE.SetupObjectInspector;
|
procedure TMainIDE.SetupObjectInspector;
|
||||||
|
begin
|
||||||
|
IDECmdScopeObjectInspectorOnly.AddWindowClass(TObjectInspectorDlg);
|
||||||
|
|
||||||
|
IDEWindowCreators.Add(DefaultObjectInspectorName,nil,@CreateIDEWindow,
|
||||||
|
'0','120','+230','-120','',alNone,false,@OnGetLayout);
|
||||||
|
|
||||||
|
ShowAnchorDesigner:=@mnuViewAnchorEditorClicked;
|
||||||
|
ShowTabOrderEditor:=@mnuViewTabOrderClicked;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMainIDE.SetupFormEditor;
|
||||||
begin
|
begin
|
||||||
GlobalDesignHook:=TPropertyEditorHook.Create(nil);
|
GlobalDesignHook:=TPropertyEditorHook.Create(nil);
|
||||||
GlobalDesignHook.GetPrivateDirectory:=AppendPathDelim(GetPrimaryConfigPath);
|
GlobalDesignHook.GetPrivateDirectory:=AppendPathDelim(GetPrimaryConfigPath);
|
||||||
@ -2236,17 +2250,6 @@ begin
|
|||||||
GlobalDesignHook.AddHandlerGetComponentNames(@OnPropHookGetComponentNames);
|
GlobalDesignHook.AddHandlerGetComponentNames(@OnPropHookGetComponentNames);
|
||||||
GlobalDesignHook.AddHandlerGetComponent(@OnPropHookGetComponent);
|
GlobalDesignHook.AddHandlerGetComponent(@OnPropHookGetComponent);
|
||||||
|
|
||||||
IDECmdScopeObjectInspectorOnly.AddWindowClass(TObjectInspectorDlg);
|
|
||||||
|
|
||||||
IDEWindowCreators.Add(DefaultObjectInspectorName,nil,@CreateIDEWindow,
|
|
||||||
'0','120','+230','-120','',alNone,false,@OnGetLayout);
|
|
||||||
|
|
||||||
ShowAnchorDesigner:=@mnuViewAnchorEditorClicked;
|
|
||||||
ShowTabOrderEditor:=@mnuViewTabOrderClicked;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TMainIDE.SetupFormEditor;
|
|
||||||
begin
|
|
||||||
CreateFormEditor;
|
CreateFormEditor;
|
||||||
FormEditor1.Obj_Inspector := ObjectInspector1;
|
FormEditor1.Obj_Inspector := ObjectInspector1;
|
||||||
FormEditor1.OnSelectFrame := @OnSelectFrame;
|
FormEditor1.OnSelectFrame := @OnSelectFrame;
|
||||||
@ -12496,7 +12499,6 @@ begin
|
|||||||
FormEditor1.UpdateComponentName(AComponent);
|
FormEditor1.UpdateComponentName(AComponent);
|
||||||
// Component can be renamed in designer and OI must be updated
|
// Component can be renamed in designer and OI must be updated
|
||||||
if ObjectInspector1<>nil then
|
if ObjectInspector1<>nil then
|
||||||
// This does not update the Name property on Windows. ToDo: find out how to update it.
|
|
||||||
ObjectInspector1.Update;
|
ObjectInspector1.Update;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user