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
This commit is contained in:
wp_xxyyzz
2016-06-24 09:50:05 +00:00
parent 8516b2ee42
commit 0cce1b3a5f

View File

@ -1521,9 +1521,12 @@ begin
if not FAllowInplaceEdit then if not FAllowInplaceEdit then
exit; exit;
if Assigned(tlInplaceEditor) and tlInplaceEditor.Visible then
exit;
AllowIt := true; AllowIt := true;
VisTask := tlTaskIndexToVisibleTask (TaskIndex); VisTask := tlTaskIndexToVisibleTask(TaskIndex);
if VisTask < 0 then if VisTask < 0 then
Exit; Exit;
@ -1542,11 +1545,11 @@ begin
tlInPlaceEditor.Parent := self; tlInPlaceEditor.Parent := self;
tlInPlaceEditor.OnExit := EndEdit; tlInPlaceEditor.OnExit := EndEdit;
end; end;
tlInplaceEditor.Show; tlInPlaceEditor.Font.Assign(Font);
tlInPlaceEditor.SetBounds(R.Left, R.Top, WidthOf(R), HeightOf(R)); tlInPlaceEditor.SetBounds(R.Left, R.Top, WidthOf(R), HeightOf(R));
tlInPlaceEditor.Text := FActiveTask.Description; tlInPlaceEditor.Text := FActiveTask.Description;
tlInPlaceEditor.Font.Assign(Font); tlInplaceEditor.Show;
tlInPlaceEditor.SelectAll; tlInplaceEditor.SetFocus;
Invalidate; Invalidate;
end; end;
end; end;