mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Minor cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23930 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
499d2a991d
commit
7d57b49746
@ -773,16 +773,16 @@ void GuiLayoutBox::updateContents(bool reset)
|
|||||||
model_->clear();
|
model_->clear();
|
||||||
DocumentClass::const_iterator lit = text_class_->begin();
|
DocumentClass::const_iterator lit = text_class_->begin();
|
||||||
DocumentClass::const_iterator len = text_class_->end();
|
DocumentClass::const_iterator len = text_class_->end();
|
||||||
|
|
||||||
for (; lit != len; ++lit) {
|
for (; lit != len; ++lit) {
|
||||||
docstring const & name = lit->name();
|
docstring const & name = lit->name();
|
||||||
|
bool const useEmpty = inset_->forceEmptyLayout() || inset_->useEmptyLayout();
|
||||||
// if this inset requires the empty layout, we skip the default
|
// if this inset requires the empty layout, we skip the default
|
||||||
// layout
|
// layout
|
||||||
if (name == text_class_->defaultLayoutName() && inset &&
|
if (name == text_class_->defaultLayoutName() && inset_ && useEmpty)
|
||||||
(inset->forceEmptyLayout() || inset->useEmptyLayout()))
|
|
||||||
continue;
|
continue;
|
||||||
// if it doesn't require the empty layout, we skip it
|
// if it doesn't require the empty layout, we skip it
|
||||||
if (name == text_class_->emptyLayoutName() && inset &&
|
if (name == text_class_->emptyLayoutName() && inset_ && !useEmpty)
|
||||||
!inset->forceEmptyLayout() && !inset->useEmptyLayout())
|
|
||||||
continue;
|
continue;
|
||||||
addItemSort(name, lit->category(), lyxrc.sort_layouts, lyxrc.group_layouts);
|
addItemSort(name, lit->category(), lyxrc.sort_layouts, lyxrc.group_layouts);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user