From e7af30be85c69f0fd3e96199e8d2c7abb0a40159 Mon Sep 17 00:00:00 2001 From: blikblum Date: Wed, 17 Feb 2010 19:23:19 +0000 Subject: [PATCH] * Set DefaultText value in constructor only when the component is dropped in design time so it can be set to '' git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1160 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/virtualtreeview-new/branches/4.8/VirtualTrees.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas b/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas index 6c9e77c47..e222cf3c1 100644 --- a/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas +++ b/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas @@ -30682,8 +30682,8 @@ constructor TCustomVirtualStringTree.Create(AOwner: TComponent); begin inherited; - - FDefaultText := 'Node'; + if (Owner = nil) or (([csReading, csDesigning] * Owner.ComponentState) = [csDesigning]) then + FDefaultText := 'Node'; FInternalDataOffset := AllocateInternalDataArea(SizeOf(Cardinal)); end;