small changed fix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4166 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-05-15 21:53:28 +00:00
parent 277569593d
commit 09955f825a
2 changed files with 16 additions and 10 deletions

View File

@ -67,16 +67,6 @@ int first_x;
int first_y;
void handleFont(BufferView * bv, string const & arg, MathTextCodes t)
{
if (mathcursor->selection())
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->handleFont(t);
for (string::const_iterator it = arg.begin(); it != arg.end(); ++it)
mathcursor->insert(*it);
}
bool openNewInset(BufferView * bv, UpdatableInset * new_inset)
{
if (!bv->insertInset(new_inset)) {
@ -179,6 +169,20 @@ void InsetFormulaBase::edit(BufferView * bv, bool front)
}
void InsetFormulaBase::handleFont
(BufferView * bv, string const & arg, MathTextCodes t)
{
if (mathcursor->selection()) {
bv->lockedInsetStoreUndo(Undo::EDIT);
updateLocal(bv, true);
}
mathcursor->handleFont(t);
for (string::const_iterator it = arg.begin(); it != arg.end(); ++it)
mathcursor->insert(*it);
updateLocal(bv, false);
}
void InsetFormulaBase::insetUnlock(BufferView * bv)
{
if (mathcursor) {

View File

@ -134,6 +134,8 @@ protected:
void metrics(BufferView * bv, LyXFont const & font) const;
///
void metrics(BufferView * bv = 0) const;
///
void handleFont(BufferView * bv, string const & arg, MathTextCodes t);
///
mutable int xo_;