bool small = size.height() < 20;
setAttribute(Qt::WA_MacSmallSize, small);
setAttribute(Qt::WA_MacNormalSize, !small);
+#else
+ (void)size; // suppress warning
#endif
}
if (!text_class_)
return;
- QString const & name = toqstr((*text_class_)[layout].name());
+ Layout const & lay = (*text_class_)[layout];
+ QString const & name = toqstr(lay.name() + (lay.isUnknown() ? " (unknown)" : ""));
if (name == currentText())
return;
for (; lit != len; ++lit) {
docstring const & name = lit->name();
- bool const useEmpty = inset_->forceEmptyLayout() || inset_->useEmptyLayout();
+ bool const useEmpty = inset_->forcePlainLayout() || inset_->usePlainLayout();
// if this inset requires the empty layout, we skip the default
// layout
if (name == text_class_->defaultLayoutName() && inset_ && useEmpty)
// if it doesn't require the empty layout, we skip it
if (name == text_class_->emptyLayoutName() && inset_ && !useEmpty)
continue;
- addItemSort(name, lit->category(), lyxrc.sort_layouts, lyxrc.group_layouts);
+ addItemSort(name + (lit->isUnknown() ? " (unknown)" : ""),
+ lit->category(), lyxrc.sort_layouts, lyxrc.group_layouts);
}
set(owner_.view()->cursor().innerParagraph().layout().name());
{
// get selection
QModelIndex mindex = filterModel_->mapToSource(filterModel_->index(index, 1));
- docstring const layoutName =
- qstring_to_ucs4(model_->itemFromIndex(mindex)->text());
+ docstring const layoutName = rtrim(
+ qstring_to_ucs4(model_->itemFromIndex(mindex)->text()), " (unknown)");
owner_.setFocus();