]> git.lyx.org Git - features.git/commitdiff
Minor cleanup.
authorRichard Heck <rgheck@comcast.net>
Mon, 24 Mar 2008 18:56:12 +0000 (18:56 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 24 Mar 2008 18:56:12 +0000 (18:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23930 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiToolbar.cpp

index dda821ceb2438da70fc48a68a8174b738d13a2a3..2c90b17f9334b522b9c81c1661157d7c7559cddf 100644 (file)
@@ -773,16 +773,16 @@ void GuiLayoutBox::updateContents(bool reset)
        model_->clear();
        DocumentClass::const_iterator lit = text_class_->begin();
        DocumentClass::const_iterator len = text_class_->end();
+
        for (; lit != len; ++lit) {
                docstring const & name = lit->name();
+               bool const useEmpty = inset_->forceEmptyLayout() || inset_->useEmptyLayout();
                // if this inset requires the empty layout, we skip the default
                // layout
-               if (name == text_class_->defaultLayoutName() && inset &&
-                   (inset->forceEmptyLayout() || inset->useEmptyLayout()))
+               if (name == text_class_->defaultLayoutName() && inset_ && useEmpty)
                        continue;
                // if it doesn't require the empty layout, we skip it
-               if (name == text_class_->emptyLayoutName() && inset &&
-                   !inset->forceEmptyLayout() && !inset->useEmptyLayout())
+               if (name == text_class_->emptyLayoutName() && inset_ && !useEmpty)
                        continue;
                addItemSort(name, lit->category(), lyxrc.sort_layouts, lyxrc.group_layouts);
        }