diff --git a/ide/packages/idedebugger/arraynavigationframe.pas b/ide/packages/idedebugger/arraynavigationframe.pas index c8c7af342e..bf97a73eb4 100644 --- a/ide/packages/idedebugger/arraynavigationframe.pas +++ b/ide/packages/idedebugger/arraynavigationframe.pas @@ -75,6 +75,7 @@ type procedure CreateWnd; override; procedure SetParent(AParent: TWinControl); override; public + constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent; ATree: TDbgTreeView; ANode: PVirtualNode); reintroduce; destructor Destroy; override; function PreferredHeight: integer; @@ -372,6 +373,7 @@ end; procedure TArrayNavigationBar.HideNavBar; begin + if FTree = nil then exit; FNavBarVisible := False; FTree.NodeRightButtonImgIdx[FNode] := IDEImages.LoadImage('NavArrow_Show'); FTree.NodeControlVisible[FNode] := False; @@ -379,6 +381,7 @@ end; procedure TArrayNavigationBar.ShowNavBar; begin + if FTree = nil then exit; Constraints.MinWidth := Max(Max(cbEnforceBound.Left + btnHide.Width + btnHide.Width, FTree.RangeX ), FTree.ClientWidth); @@ -389,6 +392,7 @@ end; procedure TArrayNavigationBar.UpdateCollapsedExpanded; begin + if FTree = nil then exit; if FTree.Expanded[FNode] then begin if FNavBarVisible then ShowNavBar @@ -498,6 +502,8 @@ end; procedure TArrayNavigationBar.DoParentResized(Sender: TObject); begin + if FTree = nil then exit; + if (edArrayStart = nil) or (Parent = nil) or (not HandleAllocated) or (not IsVisible) then exit; @@ -555,6 +561,8 @@ end; procedure TArrayNavigationBar.VisibleChanged; begin inherited VisibleChanged; + if FTree = nil then exit; + if HandleAllocated then begin if Visible then FTree.NodeControlHeight[FNode] := Max(15, PreferredHeight); @@ -566,6 +574,8 @@ end; procedure TArrayNavigationBar.CreateWnd; begin inherited CreateWnd; + if FTree = nil then exit; + if Visible then FTree.NodeControlHeight[FNode] := Max(15, PreferredHeight); UpdateCollapsedExpanded; @@ -574,16 +584,23 @@ end; procedure TArrayNavigationBar.SetParent(AParent: TWinControl); begin - if (AParent = nil) and (Parent <> nil) then + if (AParent = nil) and (Parent <> nil) and (FTree <> nil) then Parent.RemoveHandlerOnResize(@DoParentResized); inherited SetParent(AParent); - if Parent <> nil then begin + if (Parent <> nil) and (FTree <> nil) then begin Parent.AddHandlerOnResize(@DoParentResized); if HandleAllocated and IsVisible then DoParentResized(nil); end; end; +constructor TArrayNavigationBar.Create(TheOwner: TComponent); +begin + inherited Create(TheOwner); + btnHide.Visible := False; + cbAutoHide.Visible := False; +end; + constructor TArrayNavigationBar.Create(TheOwner: TComponent; ATree: TDbgTreeView; ANode: PVirtualNode); begin diff --git a/ide/packages/idedebugger/frames/watchinspecttoolbar.lfm b/ide/packages/idedebugger/frames/watchinspecttoolbar.lfm index c5a8745b3e..2d2abb8a25 100644 --- a/ide/packages/idedebugger/frames/watchinspecttoolbar.lfm +++ b/ide/packages/idedebugger/frames/watchinspecttoolbar.lfm @@ -11,7 +11,7 @@ object WatchInspectNav: TWatchInspectNav DesignTop = 35 object ToolBar1: TToolBar Left = 0 - Height = 46 + Height = 47 Top = 25 Width = 1040 AutoSize = True @@ -170,48 +170,49 @@ object WatchInspectNav: TWatchInspectNav Visible = False end inline ArrayNavigationBar1: TArrayNavigationBar - Left = 604 + Left = 1 Height = 23 - Top = 2 - Width = 253 + Top = 24 + Width = 476 + AutoSize = True ClientHeight = 23 - ClientWidth = 253 + ClientWidth = 476 TabOrder = 1 end object tbDivArray: TToolButton - Left = 857 + Left = 477 Height = 22 - Top = 2 + Top = 24 Caption = 'tbDivArray' Style = tbsDivider end object BtnAddWatch: TToolButton - Left = 862 - Top = 2 + Left = 482 + Top = 24 Caption = 'Add Watch' OnClick = BtnAddWatchClick end object BtnInspect: TToolButton - Left = 981 - Top = 2 + Left = 601 + Top = 24 Caption = 'Inspect' OnClick = BtnInspectClick end object BtnEvaluate: TToolButton - Left = 929 - Top = 2 + Left = 549 + Top = 24 Caption = 'Evaluate' OnClick = BtnEvaluateClick end object tbDivAdd: TToolButton - Left = 1027 + Left = 647 Height = 22 - Top = 2 + Top = 24 Caption = 'tbDivAdd' Style = tbsDivider end object btnEvalHistory: TToolButton - Left = 1 + Left = 652 Top = 24 Caption = 'History' DropdownMenu = mnuHistory diff --git a/ide/packages/idedebugger/inspectdlg.lfm b/ide/packages/idedebugger/inspectdlg.lfm index f58e371d91..9325ece850 100644 --- a/ide/packages/idedebugger/inspectdlg.lfm +++ b/ide/packages/idedebugger/inspectdlg.lfm @@ -96,6 +96,7 @@ object IDEInspectDlg: TIDEInspectDlg Height = 23 Top = 24 Width = 253 + AutoSize = True ClientHeight = 23 ClientWidth = 253 TabOrder = 1