]> git.lyx.org Git - features.git/commitdiff
* src/mathed/InsetMathGrid.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 5 Nov 2007 10:46:39 +0000 (10:46 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 5 Nov 2007 10:46:39 +0000 (10:46 +0000)
- clear selection before deleting row/column (fix bug 4323/1).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21433 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathGrid.cpp

index f4f70b2b2da3581c2755b633775af89ad6fa7863..da27366a7c3a74d99336b72bb38f37d1a58f3c82 100644 (file)
@@ -1161,6 +1161,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                        for (int i = 0, n = extractInt(is); i < n; ++i)
                                appendRow(cur.row());
                else if (s == "delete-row") {
+                       cur.clearSelection(); // bug 4323
                        for (int i = 0, n = extractInt(is); i < n; ++i) {
                                delRow(cur.row());
                                if (cur.idx() >= nargs())
@@ -1199,6 +1200,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                        cur.idx() = index(r, c);
                }
                else if (s == "delete-column") {
+                       cur.clearSelection(); // bug 4323
                        row_type const r = cur.row();
                        col_type const c = cur.col();
                        for (int i = 0, n = extractInt(is); i < n; ++i)