mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 08:44:01 +00:00
revert revision 23324 and implement a better more general fix in Cursor::insert().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23325 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f6e471fc8d
commit
78d63575ca
@ -362,6 +362,7 @@ void Cursor::pop()
|
||||
void Cursor::push(Inset & p)
|
||||
{
|
||||
push_back(CursorSlice(p));
|
||||
p.setBuffer(bv_->buffer());
|
||||
}
|
||||
|
||||
|
||||
@ -1022,8 +1023,10 @@ void Cursor::insert(Inset * inset)
|
||||
{
|
||||
if (inMathed())
|
||||
insert(MathAtom(inset));
|
||||
else
|
||||
else {
|
||||
text()->insertInset(*this, inset);
|
||||
inset->setBuffer(bv_->buffer());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1114,15 +1114,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
else
|
||||
c = par.getChar(pos - 1);
|
||||
string arg = to_utf8(cmd.argument());
|
||||
InsetQuotes * iq;
|
||||
if (arg == "single")
|
||||
iq = new InsetQuotes(c, bufparams.quotes_language,
|
||||
InsetQuotes::SingleQ);
|
||||
cur.insert(new InsetQuotes(c,
|
||||
bufparams.quotes_language,
|
||||
InsetQuotes::SingleQ));
|
||||
else
|
||||
iq = new InsetQuotes(c, bufparams.quotes_language,
|
||||
InsetQuotes::DoubleQ);
|
||||
iq->setBuffer(bv->buffer());
|
||||
cur.insert(iq);
|
||||
cur.insert(new InsetQuotes(c,
|
||||
bufparams.quotes_language,
|
||||
InsetQuotes::DoubleQ));
|
||||
cur.posForward();
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user