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 }
|
||||
|
||||
{$DEFINE USE_JSON_STRING}
|
||||
{.$DEFINE USE_JSON_STRING}
|
||||
|
||||
interface
|
||||
|
||||
|
@ -431,8 +431,8 @@ end;
|
||||
procedure TVpJSONDatastore.Loaded;
|
||||
begin
|
||||
inherited;
|
||||
if not (csDesigning in ComponentState) then
|
||||
Connected := AutoConnect;
|
||||
if not (csDesigning in ComponentState) and AutoConnect then
|
||||
Connected := true;
|
||||
end;
|
||||
|
||||
procedure TVpJSONDatastore.LoadEvents;
|
||||
@ -615,6 +615,9 @@ begin
|
||||
if (csDesigning in ComponentState) or (csLoading in ComponentState) then
|
||||
Exit;
|
||||
|
||||
if Value = Connected then
|
||||
exit;
|
||||
|
||||
{ Connecting or disconnecting? }
|
||||
if Value then
|
||||
ReadJSON
|
||||
|
Reference in New Issue
Block a user