From e122be6b591628ff5a3e4fbd72a21445d47e2732 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 17 Jun 2016 21:29:44 +0000 Subject: [PATCH] tvplanit: Fix missing change notification of TaskEditDialog. Fix hang of ZeosDatastore in SetConnected. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4763 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpbaseds.pas | 6 ++---- components/tvplanit/source/vpreseditdlg.pas | 1 + components/tvplanit/source/vpzeosds.pas | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/tvplanit/source/vpbaseds.pas b/components/tvplanit/source/vpbaseds.pas index 7f09c1c77..95577fba3 100644 --- a/components/tvplanit/source/vpbaseds.pas +++ b/components/tvplanit/source/vpbaseds.pas @@ -653,8 +653,7 @@ var begin for i := 0 to FNotifiers.Count - 1 do if Assigned (FNotifiers[i]) then - PostMessage (PVpWatcher (FNotifiers[i]).Handle, - Vp_DataStoreChanged, 0, 0); + PostMessage (PVpWatcher (FNotifiers[i]).Handle, Vp_DataStoreChanged, 0, 0); end; {=====} @@ -976,9 +975,8 @@ begin Res := DataStore.Resources.Items[I]; if Res = nil then Continue; - if Res.Description <> '' then begin + if Res.Description <> '' then Items.Add(Res.Description); - end; end; if DataStore.Resource = nil then diff --git a/components/tvplanit/source/vpreseditdlg.pas b/components/tvplanit/source/vpreseditdlg.pas index b4c964efd..9b8d2d2c4 100644 --- a/components/tvplanit/source/vpreseditdlg.pas +++ b/components/tvplanit/source/vpreseditdlg.pas @@ -162,6 +162,7 @@ begin EditForm.ShowModal; if EditForm.ReturnCode = rtCommit then begin EditForm.DePopulateSelf; + DataStore.NotifyDependents; result := true; end; finally diff --git a/components/tvplanit/source/vpzeosds.pas b/components/tvplanit/source/vpzeosds.pas index 6f79f3c39..e8d275788 100644 --- a/components/tvplanit/source/vpzeosds.pas +++ b/components/tvplanit/source/vpzeosds.pas @@ -292,7 +292,7 @@ end; procedure TVpZeosDatastore.SetConnected(const AValue: Boolean); begin - if {(AValue = Connected) or }(FConnection = nil) then + if (AValue = Connected) or (FConnection = nil) then exit; if AValue and AutoCreate then