Completing r37335 (apologies).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37336 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2011-01-27 00:43:25 +00:00
parent e05d115be8
commit 917785df71
2 changed files with 8 additions and 5 deletions

View File

@ -1337,14 +1337,17 @@ void Cursor::insert(Inset * inset0)
}
void Cursor::niceInsert(docstring const & t, Parse::flags f, bool enter)
int Cursor::niceInsert(docstring const & t, Parse::flags f, bool enter)
{
MathData ar(buffer());
asArray(t, ar, f);
if (ar.size() == 1 && (enter || selection()))
if (ar.size() == 1 && (enter || selection())) {
niceInsert(ar[0]);
else
return 1;
} else {
insert(ar);
return ar.size();
}
}

View File

@ -396,8 +396,8 @@ public:
void plainInsert(MathAtom const & at);
///
void niceInsert(MathAtom const & at);
///
void niceInsert(docstring const & str, Parse::flags f = Parse::NORMAL,
/// return the number of inserted array items
int niceInsert(docstring const & str, Parse::flags f = Parse::NORMAL,
bool enter = true);
/// in pixels from top of screen