From a574813335fbd93cc2f995334a8d5bcbbb03f330 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 8 Jun 2016 10:28:04 +0000 Subject: [PATCH] tvplanit: Fix disappearing cursor in contactgrid. Use FreeAndNill for inplace editor to avoid similar problems as in previous commit. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4691 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpcontactgrid.pas | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/tvplanit/source/vpcontactgrid.pas b/components/tvplanit/source/vpcontactgrid.pas index 51e917901..28b701f86 100644 --- a/components/tvplanit/source/vpcontactgrid.pas +++ b/components/tvplanit/source/vpcontactgrid.pas @@ -152,6 +152,7 @@ type cgPainting : Boolean; cgColCount : Integer; cgVScrollDelta : Integer; + FOldCursor : TCursor; { property methods } function GetBarWidth: Integer; @@ -1979,8 +1980,11 @@ begin Break; end; end; - if OverBar then - SetCursor(Screen.Cursors[crHSplit]); + if OverBar then begin + if Cursor <> crHSplit then FOldCursor := Cursor; + Cursor := crHSplit + end else + Cursor := FOldCursor; end; end; {=====} @@ -2376,8 +2380,7 @@ begin end; end; - cgInPlaceEditor.Free; - cgInPlaceEditor := nil; + FreeAndNil(cgInPlaceEditor); if FActiveContact.Changed then begin DataStore.PostContacts;