docstring const & n = newone->insetLayout(layoutName).name();
bool const is_undefined = n.empty() ||
n == DocumentClass::plainInsetLayout().name();
- if (!is_undefined)
+ docstring const & oldn = oldone->insetLayout(layoutName).name();
+ bool const was_undefined = oldn.empty() ||
+ oldn == DocumentClass::plainInsetLayout().name();
+ if (!is_undefined || was_undefined)
continue;
// The flex inset is undefined in newtc
string lyx = theClipboard().getAsLyX();
if (!lyx.empty()) {
Buffer buffer(string(), false);
+ buffer.setInternal(true);
buffer.setUnnamed(true);
if (buffer.readString(lyx)) {
cur.recordUndo();
available = !text.empty();
if (available) {
Buffer buffer(string(), false);
+ buffer.setInternal(true);
buffer.setUnnamed(true);
available = buffer.importString(names[i], text, errorList);
if (available)