]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
* GuiSymbols: implement Dialog::getLfun()
[lyx.git] / src / TextMetrics.cpp
index c72ec7ae32be85068768ea9ade01cfa42de4975a..3bf074a5f41d5a28ac743c85baf155be9e7d7728 100644 (file)
@@ -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();
+               BOOST_ASSERT(!parPos.empty());
+               parPos.pit() = pit;
+       }
+       
        // redo insets
        // FIXME: We should always use getFont(), see documentation of
        // noFontChange() in Inset.h.