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()
+ || cur.lastpit() == 0) {
// reset first par to default
LayoutPtr const layout =
cur.buffer().params().getTextClass().defaultLayout();
#include "InsetBox.h"
+#include "Buffer.h"
#include "BufferView.h"
#include "Cursor.h"
#include "DispatchResult.h"
InsetBox::InsetBox(BufferParams const & bp, string const & label)
: InsetCollapsable(bp), params_(label)
{
+ setLayout(bp);
init();
}
{
params_.read(lex);
InsetCollapsable::read(buf, lex);
+ setLayout(buf.params());
setButtonLabel();
}
case LFUN_INSET_MODIFY: {
//lyxerr << "InsetBox::dispatch MODIFY" << endl;
InsetBoxMailer::string2params(to_utf8(cmd.argument()), params_);
+ setLayout(cur.buffer().params());
setButtonLabel();
break;
}
}
+bool InsetCollapsable::allowMultiPar() const
+{
+ return layout_.multipar;
+}
+
+
bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
///
bool allowSpellCheck() const { return true; }
///
+ bool allowMultiPar() const;
+ ///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
void setStatus(Cursor & cur, CollapseStatus st);
/// should paragraph indendation be ommitted in any case?
bool neverIndent(Buffer const &) const;
///
+ virtual bool allowMultiPar() const { return true; }
+ ///
InsetText(InsetText const &);
// Update the counters of this inset and of its contents