]> git.lyx.org Git - features.git/commitdiff
* TextMetrics.cpp: cosmetics.
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 21 Nov 2009 01:15:12 +0000 (01:15 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 21 Nov 2009 01:15:12 +0000 (01:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32117 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index fe7a928e144ab3857f5df95bdc6680faefb7417c..336d75f5363ede124ed391146b1bc43aad5b6f93 100644 (file)
@@ -1495,8 +1495,8 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
        
        int yy = y; // is modified by getPitAndRowNearY
        Row const & row = getPitAndRowNearY(yy, pit, assert_in_view, up);
-       bool bound = false;
 
+       bool bound = false; // is modified by getColumnNearX
        int xx = x; // is modified by getColumnNearX
        pos_type const pos = row.pos()
                + getColumnNearX(pit, row, xx, bound);
@@ -1518,17 +1518,16 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
        }
 
        ParagraphList const & pars = text_->paragraphs();
-       Inset const * insetBefore = pos ? pars[pit].getInset(pos - 1) : 0;
-       //Inset * insetBehind = pars[pit].getInset(pos);
+       Inset const * inset_before = pos ? pars[pit].getInset(pos - 1) : 0;
 
        // This should be just before or just behind the
        // cursor position set above.
-       LASSERT((pos != 0 && inset == insetBefore)
+       LASSERT(inset == inset_before 
                || inset == pars[pit].getInset(pos), /**/);
 
        // Make sure the cursor points to the position before
        // this inset.
-       if (inset == insetBefore) {
+       if (inset == inset_before) {
                --cur.pos();
                cur.boundary(false);
        }