From: <ah...@us...> - 2008-07-14 15:39:35
|
Revision: 11823 http://jvcl.svn.sourceforge.net/jvcl/?rev=11823&view=rev Author: ahuser Date: 2008-07-14 08:39:33 -0700 (Mon, 14 Jul 2008) Log Message: ----------- Opening the LookupSource after the DataSource didn't showed the selected value. Modified Paths: -------------- trunk/jvcl/run/JvDBLookup.pas Modified: trunk/jvcl/run/JvDBLookup.pas =================================================================== --- trunk/jvcl/run/JvDBLookup.pas 2008-06-29 13:33:03 UTC (rev 11822) +++ trunk/jvcl/run/JvDBLookup.pas 2008-07-14 15:39:33 UTC (rev 11823) @@ -73,6 +73,7 @@ TLookupSourceLink = class(TDataLink) private FDataControl: TJvLookupControl; + FLockCount: Integer; protected procedure ActiveChanged; override; procedure LayoutChanged; override; @@ -821,8 +822,15 @@ procedure TLookupSourceLink.DataSetChanged; begin - if FDataControl <> nil then - FDataControl.ListLinkDataChanged; + if (FDataControl <> nil) and (FLockCount = 0) then + begin + Inc(FLockCount); + try + FDataControl.ListLinkDataChanged; + finally + Dec(FLockCount); + end; + end; end; //=== { TJvLookupControl } =================================================== @@ -3028,7 +3036,7 @@ procedure TJvDBLookupCombo.ListLinkDataChanged; begin - if FDataLink.Active and FDataLink.DataSet.IsLinkedTo(LookupSource) then + if FDataLink.Active {and FDataLink.DataSet.IsLinkedTo(LookupSource)} then if FListActive then DataLinkRecordChanged(nil); end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |