we've put something into it. (We also don't need to copy an
empty string into it.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40240
a592a061-630c-0410-9148-
cb99ea01b6c8
inset->edit(cur, true);
// Now put this into inset
Font const f(inherit_font, cur.current_font.language());
- cur.text()->insertStringAsLines(cur, ds, f);
- cur.leaveInset(*inset);
+ if (!ds.empty()) {
+ cur.text()->insertStringAsLines(cur, ds, f);
+ cur.leaveInset(*inset);
+ inset->asInsetCollapsable()->setStatus(InsetCollapsable::Collapsed);
+ }
return true;
}