You've already forked lazarus-ccr
JvclLaz: Improve usability of the JvDBTreeView at designtime.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8182 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -658,9 +658,8 @@ procedure TJvCustomDBTreeView.LinkActive(Value: Boolean);
|
||||
begin
|
||||
if not Value then
|
||||
HideEditor;
|
||||
if not AllFieldsValid then
|
||||
if (not AllFieldsValid) and (not (csDesigning in ComponentState)) then
|
||||
Exit;
|
||||
//if ( csDesigning in ComponentState ) then Exit;
|
||||
if ValidDataSet then
|
||||
begin
|
||||
RefreshChild(nil);
|
||||
@ -704,6 +703,8 @@ var
|
||||
cNode: TTreeNode;
|
||||
fbnString: string;
|
||||
flt: String;
|
||||
|
||||
lItemField, lDetailField: TField;
|
||||
begin
|
||||
// CheckDataSet;
|
||||
if not ValidDataSet or UpdateLocked then
|
||||
@ -711,6 +712,9 @@ begin
|
||||
Inc(FUpdateLock);
|
||||
with FDataLink.DataSet do
|
||||
begin
|
||||
lItemField := FieldByName(FItemField);
|
||||
lDetailField := FieldByName(FDetailField);
|
||||
|
||||
BK := GetBookmark;
|
||||
try
|
||||
DisableControls;
|
||||
@ -747,14 +751,14 @@ begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
fbnString := FieldByName(FDetailField).AsString; // avoid overhead
|
||||
fbnString := lDetailField.AsString; // avoid overhead
|
||||
if FUseFilter or
|
||||
(((ParentValue = Null) and
|
||||
((fbnString = '') or
|
||||
(Copy(Trim(fbnString), 1, 1) = '-'))) or
|
||||
(FieldByName(FDetailField).Value = ParentValue)) then
|
||||
(lDetailField.Value = ParentValue)) then
|
||||
begin
|
||||
with Items.AddChild(ANode, FieldByName(FItemField).Text) as TJvDBTreeNode do
|
||||
with Items.AddChild(ANode, lItemField.Text) as TJvDBTreeNode do
|
||||
begin
|
||||
FMasterValue := FieldValues[FMasterField];
|
||||
if FIconField <> '' then
|
||||
|
Reference in New Issue
Block a user