Make insert-around-select work properly for rootinset

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-04-11 18:48:34 +00:00
parent ff38a62be6
commit 361db9a6b1
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-04-11 Martin Vermeer <martin.vermeer@hut.fi>
* math_nestinset.C (doDispatch): make insert-around-selection
of root inset take the base, not the exponent
2005-04-10 Martin Vermeer <martin.vermeer@hut.fi>
* math_deliminset.Ci (isParenthesis):

View File

@ -811,8 +811,11 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
recordUndo(cur, Undo::ATOMIC);
MathArray ar;
asArray(cmd.argument, ar);
int cell(0);
if (cmd.argument == "\\root")
cell = 1;
if (ar.size() == 1 && (ar[0].nucleus()->asNestInset())) {
cur.handleNest(ar[0]);
cur.handleNest(ar[0], cell);
} else
cur.niceInsert(cmd.argument);
break;