]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Small improvement for bug #7509 as suggested by JMarc
[lyx.git] / src / TextMetrics.cpp
index 2a74ddd1d797ab4788bcf30a3fe2edbe0a8ba507..778da312a714a3af675b44fc90f37e6d9bdf8b65 100644 (file)
@@ -401,6 +401,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
        InsetList::const_iterator ii = par.insetList().begin();
        InsetList::const_iterator iend = par.insetList().end();
        for (; ii != iend; ++ii) {
+               // FIXME Doesn't this HAVE to be non-empty?
                // position already initialized?
                if (!parPos.empty()) {
                        parPos.pos() = ii->pos;
@@ -1495,7 +1496,7 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
        // This should be just before or just behind the
        // cursor position set above.
        LASSERT(inset == inset_before 
-               || inset == pars[pit].getInset(pos), /**/);
+               || inset == pars[pit].getInset(pos), return 0);
 
        // Make sure the cursor points to the position before
        // this inset.