You've already forked lazarus-ccr
tvplanit: Fix VpNavBar component editor crashing after adding an item if no image list is assigned.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6418 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -209,11 +209,9 @@ object frmNavBarEd: TfrmNavBarEd
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 4
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
OnClick = lbItemsClick
|
||||
OnDrawItem = lbItemsDrawItem
|
||||
OnMeasureItem = lbItemsMeasureItem
|
||||
Style = lbOwnerDrawVariable
|
||||
TabOrder = 0
|
||||
end
|
||||
object pnlItemBtns: TPanel
|
||||
|
@ -536,8 +536,15 @@ begin
|
||||
FBar := ABar;
|
||||
FDesigner := ADesigner;
|
||||
|
||||
if FBar <> nil then
|
||||
if FBar <> nil then begin
|
||||
FBar.FreeNotification(self);
|
||||
if FBar.Images = nil then
|
||||
lbItems.Style := lbStandard
|
||||
else begin
|
||||
lbItems.ItemHeight := FBar.Images.Height + 2 * vITEMS_MARGIN;
|
||||
lbItems.Style := lbOwnerDrawFixed;
|
||||
end;
|
||||
end;
|
||||
|
||||
PopulateFolderList;
|
||||
PopulateImagesList;
|
||||
@ -632,8 +639,8 @@ begin
|
||||
(Rect.Top + Rect.Bottom - Bar.Images.Height) div 2,
|
||||
btn.IconIndex
|
||||
);
|
||||
dec(Rect.Right, Bar.Images.Width + 2*delta);
|
||||
end;
|
||||
dec(Rect.Right, Bar.Images.Width + 2*delta);
|
||||
|
||||
// Draw text
|
||||
ts := lb.Canvas.TextStyle;
|
||||
|
Reference in New Issue
Block a user