}
-InsetLayout::InsetDecoration InsetFlex::decoration() const
+InsetDecoration InsetFlex::decoration() const
{
- InsetLayout::InsetDecoration const dec = getLayout().decoration();
- return dec == InsetLayout::DEFAULT ? InsetLayout::CONGLOMERATE : dec;
+ InsetDecoration const dec = getLayout().decoration();
+ return dec == InsetDecoration::DEFAULT ? InsetDecoration::CONGLOMERATE : dec;
}
FuncStatus & flag) const
{
switch (cmd.action()) {
+ case LFUN_INSET_SPLIT:
case LFUN_INSET_DISSOLVE:
if (!cmd.argument().empty()) {
InsetLayout const & il = getLayout();
- InsetLayout::InsetLyXType const type =
+ InsetLyXType const type =
translateLyXType(to_utf8(cmd.argument()));
if (il.lyxtype() == type
|| (il.name() == DocumentClass::plainInsetLayout().name()
- && type == InsetLayout::CHARSTYLE)) {
- FuncRequest temp_cmd(LFUN_INSET_DISSOLVE);
+ && type == InsetLyXType::CHARSTYLE)) {
+ FuncRequest temp_cmd(cmd.action());
return InsetCollapsible::getStatus(cur, temp_cmd, flag);
} else
return false;
void InsetFlex::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action()) {
+ case LFUN_INSET_SPLIT:
case LFUN_INSET_DISSOLVE:
if (!cmd.argument().empty()) {
InsetLayout const & il = getLayout();
- InsetLayout::InsetLyXType const type =
+ InsetLyXType const type =
translateLyXType(to_utf8(cmd.argument()));
if (il.lyxtype() == type
|| (il.name() == DocumentClass::plainInsetLayout().name()
- && type == InsetLayout::CHARSTYLE)) {
- FuncRequest temp_cmd(LFUN_INSET_DISSOLVE);
+ && type == InsetLyXType::CHARSTYLE)) {
+ FuncRequest temp_cmd(cmd.action());
InsetCollapsible::doDispatch(cur, temp_cmd);
} else
cur.undispatched();
}
-void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype)
+void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
{
BufferParams const & bp = buffer().masterBuffer()->params();
InsetLayout const & il = getLayout();
// need a layout flag
cnts.saveLastCounter();
}
- InsetCollapsible::updateBuffer(it, utype);
+ InsetCollapsible::updateBuffer(it, utype, deleted);
if (save_counter)
cnts.restoreLastCounter();
}