// the inset is not in the paragraph any more
tmpInset = fromPar.releaseInset(fromPos);
}
-
- Inset * inset = toPar.inInset();
- if (inset && !inset->insetAllowed(tmpInset->lyxCode())) {
- delete tmpInset;
- return false;
- }
-
- toPar.insertInset(toPos, tmpInset, tmpFont, tmpChange);
+ return toPar.insertInset(toPos, tmpInset, tmpFont, tmpChange);
} else {
fromPar.eraseChar(fromPos, false);
toPar.insertChar(toPos, tmpChar, tmpFont, tmpChange);
Paragraph & par = pars[par_offset];
// remember to set the inset_owner
- tmp->setInsetOwner(par.inInset());
+ tmp->setInsetOwner(&par.inInset());
// without doing that we get a crash when typing <Return> at the
// end of a paragraph
tmp->setPlainOrDefaultLayout(bparams.documentClass());
Paragraph());
Paragraph & par = pars[par_offset];
+ tmp.setInsetOwner(&par.inInset());
tmp.makeSameLayout(par);
- tmp.setInsetOwner(par.inInset());
LASSERT(pos <= par.size(), /**/);