[EMAIL PROTECTED] wrote:
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Text3.cpp?rev=20898
==============================================================================
--- lyx-devel/trunk/src/Text3.cpp (original)
+++ lyx-devel/trunk/src/Text3.cpp Thu Oct 11 12:13:45 2007
@@ -210,8 +210,8 @@
if (gotsel && pastesel) {
lyx::dispatch(FuncRequest(LFUN_PASTE, "0"));
- InsetLayout il =
inset->getLayout(cur.buffer().params());
- if (!il.multipar || cur.lastpit() == 0) {
+ if (!static_cast<InsetText *>(inset)->allowMultiPar()
Two questions:
1. Why add an allowMultiPar member to InsetCollapsable if you're not
going to use it (or does InsetCollapsable now derive from InsetText?).
2. Are you guaranteed to have an InsetText inset here? The code would
be safer as:
InsetText * insetText = dynamic_cast<InsetText *>(inset);
if (insetText && insetText->allowMultiPar())