diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-12-04 16:58:07 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-12-04 16:58:07 +0000 |
commit | 44b1743298e0e293d105ffb2921f63496341ee41 (patch) | |
tree | 823e5f33fc596c981d037be6a04f338d678333cf /docview/components/richtext | |
parent | 42eea69aadc8812836ed084ac94d88d0e45622b1 (diff) | |
download | fpGUI-44b1743298e0e293d105ffb2921f63496341ee41.tar.xz |
RichTextView can now have Text set even in the constructor phase of a form.
Before we were forced to only set text in the OnShow or later.
Diffstat (limited to 'docview/components/richtext')
-rw-r--r-- | docview/components/richtext/RichTextView.pas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas index 55395709..db8f8d86 100644 --- a/docview/components/richtext/RichTextView.pas +++ b/docview/components/richtext/RichTextView.pas @@ -716,7 +716,9 @@ begin if Length(FText) = 0 then exit; // no need to paint anything further. - Assert(FLayout <> nil, 'FLayout may not be nil at this point!'); + if FLayoutRequired then + // we haven't yet done a layout + Layout; if not Debug then Draw( 0, FLayout.FNumLines ) else |