Abdelrazak Younes wrote:
Tommaso Cucinotta wrote:
Hi all,
I'd like to know if, in the BufferView/TextMetrics classes,
there is any method that is always called every time there
is a change in the "paragraphs structure", i.e.:
-) after creating a new document
-) after opening a document
-) after breaking a paragraph in two or adding a new paragraph
(i.e. hitting enter)
-) as a result of multi-paragraph cut or paste operations
One such method that I identified would seem to be updateMetrics(false),
but I'm not sure it captures all the cases.
'updateMetrics(false)' will rebreak all visible paragraph of the main
Text. 'updateMetrics(true)' will try to rebreak only the currently
edited paragraph.
I just separated out the two cases to simplify things. And I've also
added some documentation.
Abdel.