From 0cce1b3a5fb6b53ef51965ab9363ffa426b787c0 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 24 Jun 2016 09:50:05 +0000 Subject: [PATCH] tvplanit: Fix TaskList to show selection in the inplace editor. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4817 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vptasklist.pas | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/tvplanit/source/vptasklist.pas b/components/tvplanit/source/vptasklist.pas index 7bd6a93e6..8fc7a02bd 100644 --- a/components/tvplanit/source/vptasklist.pas +++ b/components/tvplanit/source/vptasklist.pas @@ -1521,11 +1521,14 @@ begin if not FAllowInplaceEdit then exit; + if Assigned(tlInplaceEditor) and tlInplaceEditor.Visible then + exit; + AllowIt := true; - VisTask := tlTaskIndexToVisibleTask (TaskIndex); + VisTask := tlTaskIndexToVisibleTask(TaskIndex); if VisTask < 0 then - Exit; + Exit; { call the user defined BeforeEdit task } if Assigned(FBeforeEdit) then @@ -1542,11 +1545,11 @@ begin tlInPlaceEditor.Parent := self; tlInPlaceEditor.OnExit := EndEdit; end; - tlInplaceEditor.Show; + tlInPlaceEditor.Font.Assign(Font); tlInPlaceEditor.SetBounds(R.Left, R.Top, WidthOf(R), HeightOf(R)); tlInPlaceEditor.Text := FActiveTask.Description; - tlInPlaceEditor.Font.Assign(Font); - tlInPlaceEditor.SelectAll; + tlInplaceEditor.Show; + tlInplaceEditor.SetFocus; Invalidate; end; end;