From ea72a7a350b7c9acfe783157c4151523f5f434c4 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 18 Jun 2016 23:31:19 +0000 Subject: [PATCH] tvplanit: Fix incorrect closing of weekview's inplace editor in MouseClick. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4772 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpweekview.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/tvplanit/source/vpweekview.pas b/components/tvplanit/source/vpweekview.pas index d989cdae8..306615126 100644 --- a/components/tvplanit/source/vpweekview.pas +++ b/components/tvplanit/source/vpweekview.pas @@ -1353,7 +1353,7 @@ begin if not Focused then SetFocus; - if wvInPlaceEditor <> nil then + if (wvInPlaceEditor <> nil) and wvInPlaceEditor.Visible then EndEdit(Self); if (Msg.YPos > wvHeaderHeight) then @@ -1902,7 +1902,8 @@ end; procedure TVpWeekView.EndEdit(Sender: TObject); begin - if (wvInPlaceEditor <> nil) and (ActiveEvent <> nil) then begin + if (wvInPlaceEditor <> nil) and wvInplaceEditor.Visible and (ActiveEvent <> nil) + then begin if wvInPlaceEditor.Text <> ActiveEvent.Description then begin ActiveEvent.Description := wvInPlaceEditor.Text; ActiveEvent.Changed := true;