Safer code for allowMultiPar(), thx Angus

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20939 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2007-10-13 09:14:49 +00:00
parent f357fb955f
commit ee038db36d

View File

@ -211,7 +211,8 @@ static bool doInsertInset(Cursor & cur, Text * text,
if (gotsel && pastesel) {
lyx::dispatch(FuncRequest(LFUN_PASTE, "0"));
if (!static_cast<InsetText *>(inset)->allowMultiPar()
InsetText * insetText = dynamic_cast<InsetText *>(inset);
if (insetText && !insetText->allowMultiPar()
|| cur.lastpit() == 0) {
// reset first par to default
LayoutPtr const layout =