]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
Add a preference option to specify the default length unit (cm or in).
[lyx.git] / src / TextClass.cpp
index 32976c35d79c817c812ef9a2588204c0ee69f9ce..0ab0c5ce88c1ce31b5ef6a5e0f86606ddfcd9bc8 100644 (file)
@@ -1221,10 +1221,13 @@ bool TextClass::load(string const & path) const
 }
 
 
-void DocumentClass::addLayoutIfNeeded(docstring const & n) const
+bool DocumentClass::addLayoutIfNeeded(docstring const & n) const
 {
-       if (!hasLayout(n))
-               layoutlist_.push_back(createBasicLayout(n, true));
+       if (hasLayout(n))
+               return false;
+
+       layoutlist_.push_back(createBasicLayout(n, true));
+       return true;
 }