mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
* There are cases where updateLabels is not called because no
paragraph relayout happens (e.g. when inserting a InsetBranch, the InsetText inside was not processed by any updateLabels call), and hence the macrocontext is not always set. This should not happen often in fact. So we update the labels in that case explicitely when we see an empty macrocontext. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
270ca445e5
commit
08d9375572
@ -379,7 +379,16 @@ bool TextMetrics::redoParagraph(pit_type const pit)
|
||||
DocIterator parPos = text_->macrocontextPosition();
|
||||
if (!parPos.empty())
|
||||
parPos.pit() = pit;
|
||||
|
||||
else {
|
||||
LYXERR(Debug::INFO, "MacroContext not initialised!"
|
||||
<< " Going through the buffer again and hope"
|
||||
<< " the context is better then.");
|
||||
updateLabels(bv_->buffer());
|
||||
parPos = text_->macrocontextPosition();
|
||||
parPos.pit() = pit;
|
||||
BOOST_ASSERT(!parPos.empty());
|
||||
}
|
||||
|
||||
// redo insets
|
||||
// FIXME: We should always use getFont(), see documentation of
|
||||
// noFontChange() in Inset.h.
|
||||
|
Loading…
Reference in New Issue
Block a user