]> git.lyx.org Git - lyx.git/blobdiff - src/bufferview_funcs.C
* frontends/qt4/GuiWorkArea.C: make "unknown version" translateable
[lyx.git] / src / bufferview_funcs.C
index d5dec9c6c60f0996e677bf65fddae6a372449841..bd47dcefa772b240c6c7cb34ab2f44c302a6a175 100644 (file)
@@ -177,6 +177,10 @@ Point coordOffset(BufferView const & bv, DocIterator const & dit,
        // Add contribution of initial rows of outermost paragraph
        CursorSlice const & sl = dit[0];
        Paragraph const & par = sl.text()->getPar(sl.pit());
+       if (par.rows().empty())
+               // FIXME: The special case below happens for empty paragraph creation
+               const_cast<LyXText *>(sl.text())->redoParagraph(const_cast<BufferView &>(bv), sl.pit());
+       BOOST_ASSERT(!par.rows().empty());
        y -= par.rows()[0].ascent();
 #if 1
        size_t rend;