From 56e14fe251b183c6f71d67191445a2aa1b2a7d32 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 26 Aug 2010 10:44:52 +0200 Subject: richview: disabled clipboard items in popup menu for now. * This causes the app using Richview to freeze. :-/ --- docview/components/richtext/RichTextView.pas | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'docview') diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas index ec1af338..49ea97c4 100644 --- a/docview/components/richtext/RichTextView.pas +++ b/docview/components/richtext/RichTextView.pas @@ -516,16 +516,12 @@ implementation FSelectionEnd := -1; FSelectionStart := -1; - - // clear display of selection - { TODO -oGraeme : Draw must not be called here } -// Draw( StartLine, EndLine ); - Canvas.SetClipRect(OldClip); end; FSelectionEnd := -1; FSelectionStart := -1; + Repaint; end; Function TRichTextView.GetTextEnd: longint; @@ -539,7 +535,9 @@ implementation FDefaultMenu.OnShow := @DefaultMenuPopup; FSelectAllMI := FDefaultMenu.AddMenuItem('Select &All', '', @SelectAllMIClick); + FSelectAllMI.Enabled := False; // TODO: implement me FCopyMI := FDefaultMenu.AddMenuItem('&Copy', '', @CopyMIClick); + FCopyMI.Enabled := False; // TODO: implement me FDefaultMenu.AddMenuItem('-', '', nil); FRefreshMI := FDefaultMenu.AddMenuItem('&Refresh', '', @RefreshMIClick); FDefaultMenu.AddMenuItem('-', '', nil); @@ -2405,8 +2403,9 @@ function TRichTextView.CopyTextToBuffer( Buffer: PChar; Procedure TRichTextView.SelectAll; begin ClearSelection; - SelectionStart := FLayout.GetCharIndex( FText ); - SelectionEnd := FLayout.GetTextEnd; + FSelectionStart := FLayout.GetCharIndex( FText ); + FSelectionEnd := FLayout.GetTextEnd; + Repaint; end; (* -- cgit v1.2.3-54-g00ecf