You've already forked lazarus-ccr
tvplanit: Fix JSONDatastore deleting data file when started next time.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6669 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4,7 +4,7 @@ unit Unit1;
|
|||||||
|
|
||||||
{ Activate this define to use a JSON string instead of a file }
|
{ Activate this define to use a JSON string instead of a file }
|
||||||
|
|
||||||
{$DEFINE USE_JSON_STRING}
|
{.$DEFINE USE_JSON_STRING}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
@ -431,8 +431,8 @@ end;
|
|||||||
procedure TVpJSONDatastore.Loaded;
|
procedure TVpJSONDatastore.Loaded;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
if not (csDesigning in ComponentState) then
|
if not (csDesigning in ComponentState) and AutoConnect then
|
||||||
Connected := AutoConnect;
|
Connected := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TVpJSONDatastore.LoadEvents;
|
procedure TVpJSONDatastore.LoadEvents;
|
||||||
@ -615,6 +615,9 @@ begin
|
|||||||
if (csDesigning in ComponentState) or (csLoading in ComponentState) then
|
if (csDesigning in ComponentState) or (csLoading in ComponentState) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
|
if Value = Connected then
|
||||||
|
exit;
|
||||||
|
|
||||||
{ Connecting or disconnecting? }
|
{ Connecting or disconnecting? }
|
||||||
if Value then
|
if Value then
|
||||||
ReadJSON
|
ReadJSON
|
||||||
|
Reference in New Issue
Block a user